| 1555 | } |
| 1556 | |
| 1557 | void json_add_config_plugin(struct json_stream *stream, |
| 1558 | const struct plugins *plugins, |
| 1559 | const char *fieldname, |
| 1560 | const struct opt_table *ot) |
| 1561 | { |
| 1562 | struct plugin *plugin; |
| 1563 | |
| 1564 | /* Shortcut */ |
| 1565 | if (!is_plugin_opt(ot)) |
| 1566 | return; |
| 1567 | |
| 1568 | /* Find the plugin that registered this RPC call */ |
| 1569 | plugin = plugin_opt_find_any(plugins, ot, NULL); |
| 1570 | if (plugin) |
| 1571 | json_add_string(stream, fieldname, plugin->cmd); |
| 1572 | } |
| 1573 | |
| 1574 | /* Start command might have included plugin-specific parameters. |
| 1575 | * We make sure they *are* parameters for this plugin, then add them |
no test coverage detected