| 328 | } |
| 329 | |
| 330 | void plugin_blacklist(struct plugins *plugins, const char *name) |
| 331 | { |
| 332 | struct plugin *p, *next; |
| 333 | |
| 334 | log_debug(plugins->log, "blacklist for %s", name); |
| 335 | list_for_each_safe(&plugins->plugins, p, next, list) { |
| 336 | if (plugin_paths_match(p->cmd, name)) { |
| 337 | log_info(plugins->log, "%s: disabled via disable-plugin", |
| 338 | p->cmd); |
| 339 | list_del_from(&plugins->plugins, &p->list); |
| 340 | /* disable-plugin overrides important-plugin. */ |
| 341 | p->important = false; |
| 342 | tal_free(p); |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | tal_arr_expand(&plugins->blacklist, |
| 347 | tal_strdup(plugins->blacklist, name)); |
| 348 | } |
| 349 | |
| 350 | bool plugin_blacklisted(struct plugins *plugins, const char *name) |
| 351 | { |
no test coverage detected