From: Michael R Sweet Date: Wed, 5 Dec 2018 17:18:19 +0000 (-0500) Subject: Fix handling of MaxJobTime 0 (Issue #5438) X-Git-Tag: v2.2.10~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e4dd41459dabc5d18edbe06eb5b81291885204b;p=thirdparty%2Fcups.git Fix handling of MaxJobTime 0 (Issue #5438) --- diff --git a/CHANGES.md b/CHANGES.md index 6994ba501d..cbe016c61a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,17 +1,18 @@ -CHANGES - 2.2.10 - 2018-11-30 +CHANGES - 2.2.10 - 2018-12-05 ============================= Changes in CUPS v2.2.10 ----------------------- +- Added USB quirk rules (Issue #5395, Issue #5443) - The generated PPD files for IPP Everywhere printers did not contain the cupsManualCopies keyword (Issue #5433) - Kerberos credentials might be truncated (Issue #5435) +- The handling of `MaxJobTime 0` did not match the documentation (Issue #5438) - Incorporated the page accounting changes from CUPS 2.3 (Issue #5439) - Fixed a crash bug when mapping PPD duplex options to IPP attributes (rdar://46183976) -- Added USB quirk rules (Issue #5395, Issue #5443) Changes in CUPS v2.2.9 diff --git a/scheduler/job.c b/scheduler/job.c index 3cbe56aa89..638f256db0 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -5148,8 +5148,10 @@ update_job(cupsd_job_t *job) /* I - Job to check */ if (cancel_after) job->cancel_time = time(NULL) + ippGetInteger(cancel_after, 0); - else + else if (MaxJobTime > 0) job->cancel_time = time(NULL) + MaxJobTime; + else + job->cancel_time = 0; } } } diff --git a/scheduler/printers.c b/scheduler/printers.c index bb99907ad3..68239d85d9 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -3370,7 +3370,7 @@ add_printer_defaults(cupsd_printer_t *p)/* I - Printer */ "document-format-default", NULL, "application/octet-stream"); if (!cupsGetOption("job-cancel-after", p->num_options, p->options)) - ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, + ippAddInteger(p->attrs, IPP_TAG_PRINTER, MaxJobTime > 0 ? IPP_TAG_INTEGER : IPP_TAG_NOVALUE, "job-cancel-after-default", MaxJobTime); if (!cupsGetOption("job-hold-until", p->num_options, p->options))