MCPcopy Create free account
hub / github.com/ElementsProject/lightning / param_escaped_string_array

Function param_escaped_string_array

plugins/bkpr/bookkeeper.c:489–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489static 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
513static struct command_result *json_bkpr_report(struct command *cmd,
514 const char *buf,

Callers

nothing calls this directly

Calls 2

param_escaped_stringFunction · 0.85
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected