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 @@ -1457,6 +1457,7 @@ static const char *plugin_rpcmethod_add(struct plugin *plugin,
14571457 * usagetok , * deprtok ;
14581458 struct json_command * cmd ;
14591459 const char * usage , * err ;
1460+ char * collision_name ;
14601461
14611462 nametok = json_get_member (buffer , meth , "name" );
14621463 categorytok = json_get_member (buffer , meth , "category" );
@@ -1514,11 +1515,11 @@ static const char *plugin_rpcmethod_add(struct plugin *plugin,
15141515 cmd -> dev_only = false;
15151516 cmd -> dispatch = plugin_rpcmethod_dispatch ;
15161517 cmd -> check = plugin_rpcmethod_check ;
1517- char * collision_name ;
15181518 if (!jsonrpc_command_add (plugin -> plugins -> ld -> jsonrpc , cmd , usage ,
15191519 & collision_name )) {
15201520 struct plugin * p = find_plugin_for_command (plugin -> plugins -> ld ,
15211521 collision_name );
1522+ /** p will be NULL if collision occurs within this plugin */
15221523 if (!p ) {
15231524 p = plugin ;
15241525 }
You can’t perform that action at this time.
0 commit comments