From: Zdenek Dohnal Date: Fri, 19 Jan 2024 12:35:53 +0000 (+0100) Subject: scheduler: Fix reasons for previously printed jobs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F837%2Fhead;p=thirdparty%2Fcups.git scheduler: Fix reasons for previously printed jobs Before #832 most successfully finished jobs had incorrect job state reasons - try to fix them during loading the jobs. --- diff --git a/scheduler/job.c b/scheduler/job.c index 0e5ac281e9..469d185723 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -1832,7 +1832,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - Job */ else ippSetString(job->attrs, &job->reasons, 0, "none"); } - else if (job->state_value == IPP_JSTATE_COMPLETED && !strcmp(job->reasons, "processing-to-stop-point")) + else if (job->state_value == IPP_JSTATE_COMPLETED && !strcmp(ippGetString(job->reasons, 0, NULL), "processing-to-stop-point")) { /* * Try to fix job reasons for older jobs finished before openprinting/cups #832 was applied...