From: Michael R Sweet Date: Wed, 5 Dec 2018 18:02:09 +0000 (-0500) Subject: Fix -E option (Issue #5440) X-Git-Tag: v2.2.10~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3cfe065299e7bddcdfcd0109d1dded51967f35d;p=thirdparty%2Fcups.git Fix -E option (Issue #5440) --- diff --git a/CHANGES.md b/CHANGES.md index cbe016c61a..3c2a1c7e99 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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) diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c index 6828f8a1db..ee2438c1d3 100644 --- a/systemv/lpadmin.c +++ b/systemv/lpadmin.c @@ -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)