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