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