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

Function plugin_opt_find_any

lightningd/plugin.c:1537–1555  ·  view source on GitHub ↗

Find the plugin_opt for this ot */

Source from the content-addressed store, hash-verified

1535
1536/* Find the plugin_opt for this ot */
1537static struct plugin *plugin_opt_find_any(const struct plugins *plugins,
1538 const struct opt_table *ot,
1539 struct plugin_opt **poptp)
1540{
1541 struct plugin *plugin;
1542
1543 /* Find the plugin that registered this RPC call */
1544 list_for_each(&plugins->plugins, plugin, list) {
1545 struct plugin_opt *popt = plugin_opt_find(plugin, ot->names+2);
1546 if (popt) {
1547 if (poptp)
1548 *poptp = popt;
1549 return plugin;
1550 }
1551 }
1552
1553 /* Reaching here is possible, if a plugin was stopped! */
1554 return NULL;
1555}
1556
1557void json_add_config_plugin(struct json_stream *stream,
1558 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