File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1456,6 +1456,7 @@ static const char *plugin_rpcmethod_add(struct plugin *plugin,
14561456 const jsmntok_t * nametok , * usagetok , * deprtok ;
14571457 struct json_command * cmd ;
14581458 const char * usage , * err ;
1459+ char * collision_name ;
14591460
14601461 nametok = json_get_member (buffer , meth , "name" );
14611462 usagetok = json_get_member (buffer , meth , "usage" );
@@ -1488,11 +1489,11 @@ static const char *plugin_rpcmethod_add(struct plugin *plugin,
14881489 cmd -> dev_only = false;
14891490 cmd -> dispatch = plugin_rpcmethod_dispatch ;
14901491 cmd -> check = plugin_rpcmethod_check ;
1491- char * collision_name ;
14921492 if (!jsonrpc_command_add (plugin -> plugins -> ld -> jsonrpc , cmd , usage ,
14931493 & collision_name )) {
14941494 struct plugin * p = find_plugin_for_command (plugin -> plugins -> ld ,
14951495 collision_name );
1496+ /** p will be NULL if collision occurs within this plugin */
14961497 if (!p ) {
14971498 p = plugin ;
14981499 }
You can’t perform that action at this time.
0 commit comments