Find the plugin_opt for this ot */
| 1535 | |
| 1536 | /* Find the plugin_opt for this ot */ |
| 1537 | static 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 | |
| 1557 | void json_add_config_plugin(struct json_stream *stream, |
| 1558 | const struct plugins *plugins, |
no test coverage detected