| 1298 | } |
| 1299 | |
| 1300 | static void destroy_json_command(struct json_command *command, struct jsonrpc *rpc) |
| 1301 | { |
| 1302 | struct cmd_and_usage *cmd; |
| 1303 | |
| 1304 | if (!strmap_del(&rpc->cmdmap, command->name, &cmd)) |
| 1305 | abort(); |
| 1306 | tal_free(cmd); |
| 1307 | } |
| 1308 | |
| 1309 | static struct cmd_and_usage *command_add(struct jsonrpc *rpc, struct json_command *command) |
| 1310 | { |