| 1245 | } |
| 1246 | |
| 1247 | struct plugin *find_plugin_for_command(struct lightningd *ld, |
| 1248 | const char *cmd_name) |
| 1249 | { |
| 1250 | struct plugins *plugins = ld->plugins; |
| 1251 | struct plugin *plugin; |
| 1252 | |
| 1253 | /* Find the plugin that registered this RPC call */ |
| 1254 | list_for_each(&plugins->plugins, plugin, list) { |
| 1255 | for (size_t i=0; i<tal_count(plugin->methods); i++) { |
| 1256 | if (streq(cmd_name, plugin->methods[i])) |
| 1257 | return plugin; |
| 1258 | } |
| 1259 | } |
| 1260 | |
| 1261 | return NULL; |
| 1262 | } |
| 1263 | |
| 1264 | static struct command_result *plugin_rpcmethod_check(struct command *cmd, |
| 1265 | const char *buffer, |
no outgoing calls
no test coverage detected