summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2018-12-05 13:02:09 -0500
committerDidier Raboud <odyx@debian.org>2018-12-05 22:43:09 +0100
commit44c5ad66b87ad11cc8d45497034e3ada8f36f09a (patch)
treec1478851252f134bf5fab329abf186625fe9b5a9
parent9f45485d7a16442d2fb632b62066bcfe022d1799 (diff)
Fix -E option (Issue #5440)
-rw-r--r--systemv/lpadmin.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c
index 6828f8a1d..ee2438c1d 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)