Once they've all replied with their manifests, we can order them. */
| 134 | |
| 135 | /* Once they've all replied with their manifests, we can order them. */ |
| 136 | static void check_plugins_manifests(struct plugins *plugins) |
| 137 | { |
| 138 | struct plugin *plugin; |
| 139 | struct plugin **depfail; |
| 140 | |
| 141 | if (plugins_any_in_state(plugins, AWAITING_GETMANIFEST_RESPONSE)) |
| 142 | return; |
| 143 | |
| 144 | /* Now things are settled, try to order hooks. */ |
| 145 | depfail = plugin_hooks_make_ordered(tmpctx); |
| 146 | for (size_t i = 0; i < tal_count(depfail); i++) { |
| 147 | /* Only complain and free plugins! */ |
| 148 | if (depfail[i]->plugin_state != NEEDS_INIT) |
| 149 | continue; |
| 150 | plugin_kill(depfail[i], LOG_UNUSUAL, |
| 151 | "Cannot meet required hook dependencies"); |
| 152 | } |
| 153 | |
| 154 | /* Check that all the subscriptions are matched with real |
| 155 | * topics. */ |
| 156 | list_for_each(&plugins->plugins, plugin, list) { |
| 157 | plugin_check_subscriptions(plugin->plugins, plugin); |
| 158 | } |
| 159 | |
| 160 | /* As startup, we break out once all getmanifest are returned */ |
| 161 | if (plugins->startup) { |
| 162 | log_debug(plugins->ld->log, "io_break: %s", __func__); |
| 163 | io_break(plugins); |
| 164 | } else |
| 165 | /* Otherwise we go straight into configuring them */ |
| 166 | plugins_config(plugins); |
| 167 | } |
| 168 | |
| 169 | static void check_plugins_initted(struct plugins *plugins) |
| 170 | { |
no test coverage detected