| 499 | } |
| 500 | |
| 501 | static const struct json_command *find_cmd(const struct jsonrpc *rpc, |
| 502 | const char *buffer, |
| 503 | const jsmntok_t *tok) |
| 504 | { |
| 505 | const struct cmd_and_usage *cmd; |
| 506 | |
| 507 | cmd = strmap_getn(&rpc->cmdmap, buffer + tok->start, tok->end - tok->start); |
| 508 | if (cmd) |
| 509 | return cmd->command; |
| 510 | return NULL; |
| 511 | } |
| 512 | |
| 513 | /* This can be called directly on shutdown, even with unfinished cmd */ |
| 514 | static void destroy_command(struct command *cmd) |
no outgoing calls
no test coverage detected