]> 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 17:59:56 +0000 (12:59 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 5 Dec 2018 17:59:56 +0000 (12:59 -0500)
CHANGES.md
systemv/lpadmin.c

index cb8758abb4252954f6d094ebd501cb4233a58e98..4fa7697167b464a6febd49f29bcab48a32e50369 100644 (file)
@@ -41,6 +41,7 @@ Changes in CUPS v2.3b6
   cupsManualCopies keyword (Issue #5433)
 - Kerberos credentials might be truncated (Issue #5435)
 - The handling of `MaxJobTime 0` did not match the documentation (Issue #5438)
+- Fixed a bug adding a queue with the `-E` option (Issue #5440)
 - The scheduler was being backgrounded on macOS, causing applications to spin
   (rdar://40436080)
 - The scheduler did not validate that required initial request attributes were
index 3e2e1ff0edd682ed8716baab71c20837ce637cf6..7443023693941ae3dddf6e5edd7520c2e0acfd44 100644 (file)
@@ -1377,12 +1377,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...
   */
@@ -1415,6 +1409,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)