]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
scheduler: Fix reasons for previously printed jobs 837/head
authorZdenek Dohnal <zdohnal@redhat.com>
Fri, 19 Jan 2024 12:35:53 +0000 (13:35 +0100)
committerZdenek Dohnal <zdohnal@redhat.com>
Fri, 26 Jan 2024 05:50:45 +0000 (06:50 +0100)
Before #832 most successfully finished jobs had incorrect
job state reasons - try to fix them during loading the jobs.

scheduler/job.c

index 0e5ac281e9e0f65bb6cc5e35307df9fba027f4ca..469d185723a0f2dcf3e9469e1fbd2bd9eaa5b24d 100644 (file)
@@ -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...