| 487 | } |
| 488 | |
| 489 | static struct command_result *param_escaped_string_array(struct command *cmd, |
| 490 | const char *name, |
| 491 | const char *buffer, |
| 492 | const jsmntok_t *tok, |
| 493 | const char ***arr) |
| 494 | { |
| 495 | size_t i; |
| 496 | const jsmntok_t *s; |
| 497 | |
| 498 | if (tok->type != JSMN_ARRAY) |
| 499 | return command_fail_badparam(cmd, name, buffer, tok, |
| 500 | "should be an array"); |
| 501 | *arr = tal_arr(cmd, const char *, tok->size); |
| 502 | json_for_each_arr(i, s, tok) { |
| 503 | struct command_result *ret; |
| 504 | |
| 505 | ret = param_escaped_string(cmd, name, buffer, s, &(*arr)[i]); |
| 506 | if (ret) |
| 507 | return ret; |
| 508 | tal_steal((*arr)[i], *arr); |
| 509 | } |
| 510 | return NULL; |
| 511 | } |
| 512 | |
| 513 | static struct command_result *json_bkpr_report(struct command *cmd, |
| 514 | const char *buf, |
nothing calls this directly
no test coverage detected