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,
1488
1488
const jsmntok_t * nametok , * usagetok , * deprtok ;
1489
1489
struct json_command * cmd ;
1490
1490
const char * usage , * err ;
1491
+ char * collision_name ;
1491
1492
1492
1493
nametok = json_get_member (buffer , meth , "name" );
1493
1494
usagetok = json_get_member (buffer , meth , "usage" );
@@ -1520,11 +1521,11 @@ static const char *plugin_rpcmethod_add(struct plugin *plugin,
1520
1521
cmd -> dev_only = false;
1521
1522
cmd -> dispatch = plugin_rpcmethod_dispatch ;
1522
1523
cmd -> check = plugin_rpcmethod_check ;
1523
- char * collision_name ;
1524
1524
if (!jsonrpc_command_add (plugin -> plugins -> ld -> jsonrpc , cmd , usage ,
1525
1525
& collision_name )) {
1526
1526
struct plugin * p = find_plugin_for_command (plugin -> plugins -> ld ,
1527
1527
collision_name );
1528
+ /** p will be NULL if collision occurs within this plugin */
1528
1529
if (!p ) {
1529
1530
p = plugin ;
1530
1531
}
You can’t perform that action at this time.
0 commit comments