| 548 | } md_job_result_ctx; |
| 549 | |
| 550 | static 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 | |
| 583 | static apr_status_t job_result_raise(md_result_t *result, void *data, const char *event, apr_pool_t *p) |
| 584 | { |
nothing calls this directly
no test coverage detected