Skip to content

Commit 6af8639

Browse files
committed
Fix older jobs with incorrect final state
1 parent d847b53 commit 6af8639

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

scheduler/job.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,6 +1847,14 @@ cupsdLoadJob(cupsd_job_t *job) /* I - Job */
18471847
else
18481848
ippSetString(job->attrs, &job->reasons, 0, "none");
18491849
}
1850+
else if (job->state_value == IPP_JSTATE_COMPLETED && !strcmp(ippGetString(job->reasons, 0, NULL), "processing-to-stop-point"))
1851+
{
1852+
/*
1853+
* Try to fix job reasons for older jobs finished before openprinting/cups #832 was applied...
1854+
*/
1855+
1856+
ippSetString(job->attrs, &job->reasons, 0, "job-completed-successfully");
1857+
}
18501858

18511859
job->impressions = ippFindAttribute(job->attrs, "job-impressions-completed", IPP_TAG_INTEGER);
18521860
job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed", IPP_TAG_INTEGER);

0 commit comments

Comments
 (0)