| 620 | } |
| 621 | |
| 622 | static int json_iter_val(void *data, size_t index, md_json_t *json) |
| 623 | { |
| 624 | status_ctx *ctx = data; |
| 625 | const char *prefix = ctx->prefix; |
| 626 | if (HTML_STATUS(ctx)) { |
| 627 | if (index) apr_brigade_puts(ctx->bb, NULL, NULL, ctx->separator); |
| 628 | } |
| 629 | else { |
| 630 | ctx->prefix = apr_pstrcat(ctx->p, prefix, apr_psprintf(ctx->p, "[%" APR_SIZE_T_FMT "]", index), NULL); |
| 631 | } |
| 632 | add_json_val(ctx, json); |
| 633 | if (!HTML_STATUS(ctx)) { |
| 634 | ctx->prefix = prefix; |
| 635 | } |
| 636 | return 1; |
| 637 | } |
| 638 | |
| 639 | static void add_json_val(status_ctx *ctx, md_json_t *j) |
| 640 | { |
nothing calls this directly
no test coverage detected