| 1307 | } |
| 1308 | |
| 1309 | static struct command_result *param_command(struct command *cmd, |
| 1310 | const char *name, |
| 1311 | const char *buffer, |
| 1312 | const jsmntok_t *tok, |
| 1313 | const jsmntok_t **out) |
| 1314 | { |
| 1315 | cmd->json_cmd = find_cmd(cmd->jcon->ld->jsonrpc, buffer, tok); |
| 1316 | if (cmd->json_cmd) { |
| 1317 | *out = tok; |
| 1318 | return NULL; |
| 1319 | } |
| 1320 | |
| 1321 | return command_fail(cmd, JSONRPC2_METHOD_NOT_FOUND, |
| 1322 | "Unknown command '%.*s'", |
| 1323 | tok->end - tok->start, buffer + tok->start); |
| 1324 | } |
| 1325 | |
| 1326 | struct jsonrpc_notification *jsonrpc_notification_start(const tal_t *ctx, const char *method) |
| 1327 | { |
nothing calls this directly
no test coverage detected