summaryrefslogtreecommitdiff
path: root/scheduler/ipp.c
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2019-01-21 11:27:43 -0500
committerMichael R Sweet <michael.r.sweet@gmail.com>2019-01-21 11:27:43 -0500
commit622207eff5e9734adc2eb7ec5de6a30ddc3feb87 (patch)
treeb10fb47afd8f68fa65368dbfca8acdef9d565e16 /scheduler/ipp.c
parentd728c2935e7bd57d82a0fe5aea6b38168375d9ec (diff)
downloadcups-622207eff5e9734adc2eb7ec5de6a30ddc3feb87.tar.gz
Use the same requested-attributes values for all IPP Everywhere setup
requests (Issue #5484)
Diffstat (limited to 'scheduler/ipp.c')
-rw-r--r--scheduler/ipp.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index c771f77f8..9580bb090 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -1,7 +1,7 @@
/*
* IPP routines for the CUPS scheduler.
*
- * Copyright © 2007-2018 by Apple Inc.
+ * Copyright © 2007-2019 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
*
* This file contains Kerberos support code, copyright 2006 by
@@ -5256,6 +5256,13 @@ create_local_bg_thread(
*response; /* Response from printer */
ipp_attribute_t *attr; /* Attribute in response */
ipp_status_t status; /* Status code */
+ static const char * const pattrs[] = /* Printer attributes we need */
+ {
+ "job-template",
+ "printer-defaults",
+ "printer-description",
+ "media-col-database"
+ };
/*
@@ -5290,7 +5297,7 @@ create_local_bg_thread(
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
ippSetVersion(request, 2, 0);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, printer->device_uri);
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", NULL, "all");
+ ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", (int)(sizeof(pattrs) / sizeof(pattrs[0])), NULL, pattrs);
response = cupsDoRequest(http, request, resource);
status = cupsLastError();