diff options
Diffstat (limited to 'cups/testppd.c')
-rw-r--r-- | cups/testppd.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cups/testppd.c b/cups/testppd.c index e1b51564..a127a794 100644 --- a/cups/testppd.c +++ b/cups/testppd.c @@ -21,12 +21,12 @@ #include "cups-private.h" #include "ppd-private.h" #include <sys/stat.h> -#ifdef WIN32 +#ifdef _WIN32 # include <io.h> #else # include <unistd.h> # include <fcntl.h> -#endif /* WIN32 */ +#endif /* _WIN32 */ #include <math.h> @@ -876,6 +876,13 @@ main(int argc, /* I - Number of command-line arguments */ host[256], /* Hostname */ resource[256]; /* Resource path */ int port; /* Port number */ + static const char * const pattrs[] =/* Requested printer attributes */ + { + "job-template", + "printer-defaults", + "printer-description", + "media-col-database" + }; if (httpSeparateURI(HTTP_URI_CODING_ALL, argv[1], scheme, sizeof(scheme), userpass, sizeof(userpass), host, sizeof(host), &port, resource, sizeof(resource)) < HTTP_URI_STATUS_OK) { @@ -892,6 +899,7 @@ main(int argc, /* I - Number of command-line arguments */ request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, argv[1]); + ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", sizeof(pattrs) / sizeof(pattrs[0]), NULL, pattrs); response = cupsDoRequest(http, request, resource); if (_ppdCreateFromIPP(buffer, sizeof(buffer), response)) |