summaryrefslogtreecommitdiff
path: root/cgi-bin
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 /cgi-bin
parentd728c2935e7bd57d82a0fe5aea6b38168375d9ec (diff)
downloadcups-622207eff5e9734adc2eb7ec5de6a30ddc3feb87.tar.gz
Use the same requested-attributes values for all IPP Everywhere setup
requests (Issue #5484)
Diffstat (limited to 'cgi-bin')
-rw-r--r--cgi-bin/admin.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c
index e87e32f1d..2be019707 100644
--- a/cgi-bin/admin.c
+++ b/cgi-bin/admin.c
@@ -1,7 +1,7 @@
/*
* Administration CGI for CUPS.
*
- * Copyright © 2007-2018 by Apple Inc.
+ * Copyright © 2007-2019 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products.
*
* Licensed under Apache License v2.0. See the file "LICENSE" for more
@@ -3930,6 +3930,13 @@ get_printer_ppd(const char *uri, /* I - Printer URI */
host[256], /* Hostname */
resource[256]; /* Resource path */
int port; /* Port number */
+ static const char * const pattrs[] = /* Printer attributes we need */
+ {
+ "job-template",
+ "printer-defaults",
+ "printer-description",
+ "media-col-database"
+ };
/*
@@ -3970,6 +3977,7 @@ get_printer_ppd(const char *uri, /* I - Printer URI */
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
+ ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", (int)(sizeof(pattrs) / sizeof(pattrs[0])), NULL, pattrs);
response = cupsDoRequest(http, request, resource);
if (!_ppdCreateFromIPP(buffer, bufsize, response))