| 1543 | } |
| 1544 | |
| 1545 | void json_add_config_plugin(struct json_stream *stream, |
| 1546 | const struct plugins *plugins, |
| 1547 | const char *fieldname, |
| 1548 | const struct opt_table *ot) |
| 1549 | { |
| 1550 | struct plugin *plugin; |
| 1551 | |
| 1552 | /* Shortcut */ |
| 1553 | if (!is_plugin_opt(ot)) |
| 1554 | return; |
| 1555 | |
| 1556 | /* Find the plugin that registered this RPC call */ |
| 1557 | plugin = plugin_opt_find_any(plugins, ot, NULL); |
| 1558 | if (plugin) |
| 1559 | json_add_string(stream, fieldname, plugin->cmd); |
| 1560 | } |
| 1561 | |
| 1562 | /* Start command might have included plugin-specific parameters. |
| 1563 | * We make sure they *are* parameters for this plugin, then add them |
no test coverage detected