]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix handling of MaxJobTime 0 (Issue #5438)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 5 Dec 2018 17:18:19 +0000 (12:18 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 5 Dec 2018 17:18:19 +0000 (12:18 -0500)
CHANGES.md
scheduler/job.c
scheduler/printers.c

index 6994ba501d2b57a635f672c1cf7be015ef4dfe1f..cbe016c61a85d307f90ccc4432d54370d4559ae8 100644 (file)
@@ -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
index 3cbe56aa89f541a04af5aa5a60593772238d6c38..638f256db06383fd9954c643546ac2bdf8b82299 100644 (file)
@@ -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;
          }
         }
       }
index bb99907ad3dcd08e4d567cb0d7145c73a69b9e04..68239d85d9db295402d67b23a0999a124a570b19 100644 (file)
@@ -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))