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 @@ -1488,6 +1488,7 @@ static const char *plugin_rpcmethod_add(struct plugin *plugin,
14881488 const jsmntok_t * nametok , * usagetok , * deprtok ;
14891489 struct json_command * cmd ;
14901490 const char * usage , * err ;
1491+ char * collision_name ;
14911492
14921493 nametok = json_get_member (buffer , meth , "name" );
14931494 usagetok = json_get_member (buffer , meth , "usage" );
@@ -1520,11 +1521,11 @@ static const char *plugin_rpcmethod_add(struct plugin *plugin,
15201521 cmd -> dev_only = false;
15211522 cmd -> dispatch = plugin_rpcmethod_dispatch ;
15221523 cmd -> check = plugin_rpcmethod_check ;
1523- char * collision_name ;
15241524 if (!jsonrpc_command_add (plugin -> plugins -> ld -> jsonrpc , cmd , usage ,
15251525 & collision_name )) {
15261526 struct plugin * p = find_plugin_for_command (plugin -> plugins -> ld ,
15271527 collision_name );
1528+ /** p will be NULL if collision occurs within this plugin */
15281529 if (!p ) {
15291530 p = plugin ;
15301531 }
You can’t perform that action at this time.
0 commit comments