| 2221 | } |
| 2222 | |
| 2223 | bool plugins_config(struct plugins *plugins) |
| 2224 | { |
| 2225 | struct plugin *p; |
| 2226 | list_for_each(&plugins->plugins, p, list) { |
| 2227 | if (p->plugin_state == NEEDS_INIT) |
| 2228 | plugin_config(p); |
| 2229 | } |
| 2230 | |
| 2231 | /* Wait for them to configure, before continuing: large |
| 2232 | * nodes can take a while to startup! */ |
| 2233 | if (plugins->startup) { |
| 2234 | /* This happens if an important plugin fails init, |
| 2235 | * or if they call shutdown now. */ |
| 2236 | if (io_loop_with_timers(plugins->ld) == plugins->ld) |
| 2237 | return false; |
| 2238 | } |
| 2239 | |
| 2240 | plugins->startup = false; |
| 2241 | return true; |
| 2242 | } |
| 2243 | |
| 2244 | struct plugin_set_return { |
| 2245 | struct command *cmd; |
no test coverage detected