MCPcopy Create free account
hub / github.com/ElementsProject/lightning / plugin_dynamic_startdir

Function plugin_dynamic_startdir

lightningd/plugin_control.c:91–108  ·  view source on GitHub ↗

* Called when trying to start a plugin directory through RPC, it registers * all contained plugins recursively and then starts them. */

Source from the content-addressed store, hash-verified

89 * all contained plugins recursively and then starts them.
90 */
91static struct command_result *
92plugin_dynamic_startdir(struct plugin_command *pcmd, const char *dir_path)
93{
94 const char *err;
95 struct command_result *res;
96
97 err = add_plugin_dir(pcmd->cmd->ld->plugins, dir_path, false);
98 if (err)
99 return command_fail(pcmd->cmd, JSONRPC2_INVALID_PARAMS, "%s", err);
100
101 /* If none added, this calls plugin_cmd_all_complete immediately */
102 res = plugin_register_all_complete(pcmd->cmd->ld, pcmd);
103 if (res)
104 return res;
105
106 plugins_send_getmanifest(pcmd->cmd->ld->plugins, pcmd->cmd->id);
107 return command_still_pending(pcmd->cmd);
108}
109
110static struct command_result *plugin_stop(struct command *cmd, struct plugin *p,
111 bool kill)

Callers 1

json_plugin_controlFunction · 0.85

Calls 5

add_plugin_dirFunction · 0.85
plugins_send_getmanifestFunction · 0.85
command_failFunction · 0.70
command_still_pendingFunction · 0.70

Tested by

no test coverage detected