summaryrefslogtreecommitdiff
path: root/systemv
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2018-12-05 12:59:56 -0500
committerMichael R Sweet <michael.r.sweet@gmail.com>2018-12-05 12:59:56 -0500
commitc29d06f9f934403197e73326dd23add700dfa115 (patch)
tree1bfb7e3441f792b8fb984039e52d7ae0d166ae65 /systemv
parent9fb5f30d7885f2631222df49062c92e2b1a3542c (diff)
downloadcups-c29d06f9f934403197e73326dd23add700dfa115.tar.gz
Fix -E option (Issue #5440)
Diffstat (limited to 'systemv')
-rw-r--r--systemv/lpadmin.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c
index 3e2e1ff0e..744302369 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)