MCPcopy Create free account
hub / github.com/apache/httpd / add_md_row

Function add_md_row

modules/md/mod_md_status.c:713–735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711};
712
713static int add_md_row(void *baton, apr_size_t index, md_json_t *mdj)
714{
715 status_ctx *ctx = baton;
716 const char *prefix = ctx->prefix;
717 int i;
718
719 if (HTML_STATUS(ctx)) {
720 apr_brigade_printf(ctx->bb, NULL, NULL, "<tr class=\"%s\">", (index % 2)? "odd" : "even");
721 for (i = 0; i < (int)(sizeof(status_infos)/sizeof(status_infos[0])); ++i) {
722 apr_brigade_puts(ctx->bb, NULL, NULL, "<td>");
723 add_status_cell(ctx, mdj, &status_infos[i]);
724 apr_brigade_puts(ctx->bb, NULL, NULL, "</td>");
725 }
726 apr_brigade_puts(ctx->bb, NULL, NULL, "</tr>");
727 } else {
728 for (i = 0; i < (int)(sizeof(status_infos)/sizeof(status_infos[0])); ++i) {
729 ctx->prefix = apr_pstrcat(ctx->p, prefix, apr_psprintf(ctx->p, "[%" APR_SIZE_T_FMT "]", index), NULL);
730 add_status_cell(ctx, mdj, &status_infos[i]);
731 ctx->prefix = prefix;
732 }
733 }
734 return 1;
735}
736
737static int md_name_cmp(const void *v1, const void *v2)
738{

Callers

nothing calls this directly

Calls 1

add_status_cellFunction · 0.85

Tested by

no test coverage detected