From: Michael R Sweet Date: Wed, 5 Dec 2018 17:59:56 +0000 (-0500) Subject: Fix -E option (Issue #5440) X-Git-Tag: v2.3b6~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c29d06f9f934403197e73326dd23add700dfa115;p=thirdparty%2Fcups.git Fix -E option (Issue #5440) --- diff --git a/CHANGES.md b/CHANGES.md index cb8758abb4..4fa7697167 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c index 3e2e1ff0ed..7443023693 100644 --- a/systemv/lpadmin.c +++ b/systemv/lpadmin.c @@ -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)