| 2209 | } |
| 2210 | |
| 2211 | bool plugins_config(struct plugins *plugins) |
| 2212 | { |
| 2213 | struct plugin *p; |
| 2214 | list_for_each(&plugins->plugins, p, list) { |
| 2215 | if (p->plugin_state == NEEDS_INIT) |
| 2216 | plugin_config(p); |
| 2217 | } |
| 2218 | |
| 2219 | /* Wait for them to configure, before continuing: large |
| 2220 | * nodes can take a while to startup! */ |
| 2221 | if (plugins->startup) { |
| 2222 | /* This happens if an important plugin fails init, |
| 2223 | * or if they call shutdown now. */ |
| 2224 | if (io_loop_with_timers(plugins->ld) == plugins->ld) |
| 2225 | return false; |
| 2226 | } |
| 2227 | |
| 2228 | plugins->startup = false; |
| 2229 | return true; |
| 2230 | } |
| 2231 | |
| 2232 | struct plugin_set_return { |
| 2233 | struct command *cmd; |
no test coverage detected