| 2003 | } |
| 2004 | |
| 2005 | bool plugins_send_getmanifest(struct plugins *plugins, const char *cmd_id) |
| 2006 | { |
| 2007 | struct plugin *p, *next; |
| 2008 | bool sent = false; |
| 2009 | |
| 2010 | /* Spawn the plugin processes before entering the io_loop */ |
| 2011 | list_for_each_safe(&plugins->plugins, p, next, list) { |
| 2012 | const char *err; |
| 2013 | |
| 2014 | if (p->plugin_state != UNCONFIGURED) |
| 2015 | continue; |
| 2016 | err = plugin_send_getmanifest(p, cmd_id); |
| 2017 | if (!err) { |
| 2018 | sent = true; |
| 2019 | continue; |
| 2020 | } |
| 2021 | if (plugins->startup) |
| 2022 | fatal("error starting plugin '%s': %s", p->cmd, err); |
| 2023 | tal_free(p); |
| 2024 | } |
| 2025 | |
| 2026 | return sent; |
| 2027 | } |
| 2028 | |
| 2029 | void plugins_init(struct plugins *plugins) |
| 2030 | { |
no test coverage detected