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

Function plugin_opt_find_any

lightningd/plugin.c:1525–1543  ·  view source on GitHub ↗

Find the plugin_opt for this ot */

Source from the content-addressed store, hash-verified

1523
1524/* Find the plugin_opt for this ot */
1525static struct plugin *plugin_opt_find_any(const struct plugins *plugins,
1526 const struct opt_table *ot,
1527 struct plugin_opt **poptp)
1528{
1529 struct plugin *plugin;
1530
1531 /* Find the plugin that registered this RPC call */
1532 list_for_each(&plugins->plugins, plugin, list) {
1533 struct plugin_opt *popt = plugin_opt_find(plugin, ot->names+2);
1534 if (popt) {
1535 if (poptp)
1536 *poptp = popt;
1537 return plugin;
1538 }
1539 }
1540
1541 /* Reaching here is possible, if a plugin was stopped! */
1542 return NULL;
1543}
1544
1545void json_add_config_plugin(struct json_stream *stream,
1546 const struct plugins *plugins,

Callers 2

json_add_config_pluginFunction · 0.85
plugin_set_dynamic_optFunction · 0.85

Calls 1

plugin_opt_findFunction · 0.85

Tested by

no test coverage detected