]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix -E option (Issue #5440)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 5 Dec 2018 18:02:09 +0000 (13:02 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 5 Dec 2018 18:02:09 +0000 (13:02 -0500)
CHANGES.md
systemv/lpadmin.c

index cbe016c61a85d307f90ccc4432d54370d4559ae8..3c2a1c7e99f89f500eaee62b23623739b2438ea8 100644 (file)
@@ -11,6 +11,7 @@ Changes in CUPS v2.2.10
 - 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 bug adding a queue with the `-E` option (Issue #5440)
 - Fixed a crash bug when mapping PPD duplex options to IPP attributes
   (rdar://46183976)
 
index 6828f8a1db455faad8f1520bd113773ba68c99d0..ee2438c1d38acb85219fdfd49a352754b3225a5e 100644 (file)
@@ -1387,12 +1387,6 @@ set_printer_options(
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser());
 
-  if (enable)
-  {
-    ippAddInteger(request, IPP_TAG_PRINTER, IPP_TAG_ENUM, "printer-state", IPP_PSTATE_IDLE);
-    ippAddBoolean(request, IPP_TAG_PRINTER, "printer-is-accepting-jobs", 1);
-  }
-
  /*
   * Add the options...
   */
@@ -1425,6 +1419,13 @@ set_printer_options(
     ppdfile = NULL;
 
   cupsEncodeOptions2(request, num_options, options, IPP_TAG_OPERATION);
+
+  if (enable)
+  {
+    ippAddInteger(request, IPP_TAG_PRINTER, IPP_TAG_ENUM, "printer-state", IPP_PSTATE_IDLE);
+    ippAddBoolean(request, IPP_TAG_PRINTER, "printer-is-accepting-jobs", 1);
+  }
+
   cupsEncodeOptions2(request, num_options, options, IPP_TAG_PRINTER);
 
   if ((protocol = cupsGetOption("protocol", num_options, options)) != NULL)