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

Function job_result_update

modules/md/md_status.c:550–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548} md_job_result_ctx;
549
550static void job_result_update(md_result_t *result, void *data)
551{
552 md_job_result_ctx *ctx = data;
553 apr_time_t now;
554 const char *msg, *sep;
555
556 if (md_result_cmp(ctx->last, result)) {
557 now = apr_time_now();
558 md_result_assign(ctx->last, result);
559 if (result->activity || result->problem || result->detail) {
560 msg = sep = "";
561 if (result->activity) {
562 msg = apr_psprintf(result->p, "%s", result->activity);
563 sep = ": ";
564 }
565 if (result->detail) {
566 msg = apr_psprintf(result->p, "%s%s%s", msg, sep, result->detail);
567 sep = ", ";
568 }
569 if (result->problem) {
570 msg = apr_psprintf(result->p, "%s%sproblem: %s", msg, sep, result->problem);
571 sep = " ";
572 }
573 md_job_log_append(ctx->job, "progress", NULL, msg);
574
575 if (ctx->store && apr_time_as_msec(now - ctx->last_save) > 500) {
576 md_job_save(ctx->job, result, ctx->p);
577 ctx->last_save = now;
578 }
579 }
580 }
581}
582
583static apr_status_t job_result_raise(md_result_t *result, void *data, const char *event, apr_pool_t *p)
584{

Callers

nothing calls this directly

Calls 4

md_result_cmpFunction · 0.85
md_result_assignFunction · 0.85
md_job_log_appendFunction · 0.85
md_job_saveFunction · 0.85

Tested by

no test coverage detected