| 1489 | } |
| 1490 | |
| 1491 | static struct command_result *param_command(struct command *cmd, |
| 1492 | const char *name, |
| 1493 | const char *buffer, |
| 1494 | const jsmntok_t *tok, |
| 1495 | const jsmntok_t **out) |
| 1496 | { |
| 1497 | /* Not cmd->jcon: they may have hung up while a hook held us. */ |
| 1498 | cmd->json_cmd = find_cmd(cmd->ld->jsonrpc, buffer, tok); |
| 1499 | if (cmd->json_cmd) { |
| 1500 | *out = tok; |
| 1501 | return NULL; |
| 1502 | } |
| 1503 | |
| 1504 | return command_fail(cmd, JSONRPC2_METHOD_NOT_FOUND, |
| 1505 | "Unknown command '%.*s'", |
| 1506 | tok->end - tok->start, buffer + tok->start); |
| 1507 | } |
| 1508 | |
| 1509 | struct jsonrpc_notification *jsonrpc_notification_start_noparams(const tal_t *ctx, const char *method) |
| 1510 | { |
nothing calls this directly
no test coverage detected