| 408 | } |
| 409 | |
| 410 | void plugin_blacklist(struct plugins *plugins, const char *name) |
| 411 | { |
| 412 | struct plugin *p, *next; |
| 413 | |
| 414 | log_debug(plugins->log, "blacklist for %s", name); |
| 415 | list_for_each_safe(&plugins->plugins, p, next, list) { |
| 416 | if (plugin_paths_match(p->cmd, name)) { |
| 417 | log_info(plugins->log, "%s: disabled via disable-plugin", |
| 418 | p->cmd); |
| 419 | list_del_from(&plugins->plugins, &p->list); |
| 420 | /* disable-plugin overrides important-plugin. */ |
| 421 | p->important = false; |
| 422 | tal_free(p); |
| 423 | } |
| 424 | } |
| 425 | |
| 426 | tal_arr_expand(&plugins->blacklist, |
| 427 | tal_strdup(plugins->blacklist, name)); |
| 428 | } |
| 429 | |
| 430 | bool plugin_blacklisted(struct plugins *plugins, const char *name) |
| 431 | { |
no test coverage detected