* Look for additions in the default plugin directory. */
| 182 | * Look for additions in the default plugin directory. |
| 183 | */ |
| 184 | static struct command_result * |
| 185 | plugin_dynamic_rescan_plugins(struct plugin_command *pcmd) |
| 186 | { |
| 187 | struct command_result *res; |
| 188 | |
| 189 | /* This will not fail on "already registered" error. */ |
| 190 | plugins_add_default_dir(pcmd->cmd->ld->plugins); |
| 191 | |
| 192 | /* If none added, this calls plugin_cmd_all_complete immediately */ |
| 193 | res = plugin_register_all_complete(pcmd->cmd->ld, pcmd); |
| 194 | if (res) |
| 195 | return res; |
| 196 | |
| 197 | plugins_send_getmanifest(pcmd->cmd->ld->plugins, pcmd->cmd->id); |
| 198 | return command_still_pending(pcmd->cmd); |
| 199 | } |
| 200 | |
| 201 | /** |
| 202 | * A plugin command which permits to control plugins without restarting |
no test coverage detected