| 1742 | } |
| 1743 | |
| 1744 | bool plugins_send_getmanifest(struct plugins *plugins, const char *cmd_id) |
| 1745 | { |
| 1746 | struct plugin *p, *next; |
| 1747 | bool sent = false; |
| 1748 | |
| 1749 | /* Spawn the plugin processes before entering the io_loop */ |
| 1750 | list_for_each_safe(&plugins->plugins, p, next, list) { |
| 1751 | const char *err; |
| 1752 | |
| 1753 | if (p->plugin_state != UNCONFIGURED) |
| 1754 | continue; |
| 1755 | err = plugin_send_getmanifest(p, cmd_id); |
| 1756 | if (!err) { |
| 1757 | sent = true; |
| 1758 | continue; |
| 1759 | } |
| 1760 | if (plugins->startup) |
| 1761 | fatal("error starting plugin '%s': %s", p->cmd, err); |
| 1762 | plugin_kill(p, LOG_UNUSUAL, "%s", err); |
| 1763 | } |
| 1764 | |
| 1765 | return sent; |
| 1766 | } |
| 1767 | |
| 1768 | void plugins_init(struct plugins *plugins) |
| 1769 | { |
no test coverage detected