]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/printers.c
Fix handling of MaxJobTime 0 (Issue #5438)
[thirdparty/cups.git] / scheduler / printers.c
index f168b4c1a4b378ec3bb8255eee678d3a97b84637..ff381cdd5ab7f3f5f15e9c0d693fcaf370aa5ae4 100644 (file)
@@ -3417,7 +3417,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))