Find the plugin_opt for this ot */
| 1523 | |
| 1524 | /* Find the plugin_opt for this ot */ |
| 1525 | static 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 | |
| 1545 | void json_add_config_plugin(struct json_stream *stream, |
| 1546 | const struct plugins *plugins, |
no test coverage detected