| 230 | } |
| 231 | |
| 232 | struct command_result *param_index(struct command *cmd, |
| 233 | const char *name, |
| 234 | const char *buffer, |
| 235 | const jsmntok_t *tok, |
| 236 | enum wait_index **index) |
| 237 | { |
| 238 | for (size_t i = 0; i < ARRAY_SIZE(index_names); i++) { |
| 239 | if (json_tok_streq(buffer, tok, index_names[i])) { |
| 240 | *index = tal(cmd, enum wait_index); |
| 241 | **index = i; |
| 242 | return NULL; |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | return command_fail_badparam(cmd, name, buffer, tok, |
| 247 | "unknown index"); |
| 248 | } |
| 249 | |
| 250 | static struct command_result *json_wait(struct command *cmd, |
| 251 | const char *buffer, |
nothing calls this directly
no test coverage detected