| 511 | } |
| 512 | |
| 513 | static struct command_result *param_escaped_string_array(struct command *cmd, |
| 514 | const char *name, |
| 515 | const char *buffer, |
| 516 | const jsmntok_t *tok, |
| 517 | const char ***arr) |
| 518 | { |
| 519 | size_t i; |
| 520 | const jsmntok_t *s; |
| 521 | |
| 522 | if (tok->type != JSMN_ARRAY) |
| 523 | return command_fail_badparam(cmd, name, buffer, tok, |
| 524 | "should be an array"); |
| 525 | *arr = tal_arr(cmd, const char *, tok->size); |
| 526 | json_for_each_arr(i, s, tok) { |
| 527 | struct command_result *ret; |
| 528 | |
| 529 | ret = param_escaped_string(cmd, name, buffer, s, &(*arr)[i]); |
| 530 | if (ret) |
| 531 | return ret; |
| 532 | tal_steal((*arr)[i], *arr); |
| 533 | } |
| 534 | return NULL; |
| 535 | } |
| 536 | |
| 537 | static struct command_result *json_bkpr_report(struct command *cmd, |
| 538 | const char *buf, |
nothing calls this directly
no test coverage detected