diff options
author | Michael R Sweet <michael.r.sweet@gmail.com> | 2018-09-28 11:22:21 -0400 |
---|---|---|
committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2018-09-28 11:22:21 -0400 |
commit | 1582479cebdaac196caf02716f7632936845aab7 (patch) | |
tree | 1a03737109691953139e2c181d8d9e62ef71da9e /systemv | |
parent | bf86060f9ef569220ac50532e4e870791063db2b (diff) | |
download | cups-1582479cebdaac196caf02716f7632936845aab7.tar.gz |
Fix lpadmin error reporting for IPP Everywhere printers (Issue #5370)
Diffstat (limited to 'systemv')
-rw-r--r-- | systemv/lpadmin.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c index bd4eb0164..2f406425c 100644 --- a/systemv/lpadmin.c +++ b/systemv/lpadmin.c @@ -1248,7 +1248,12 @@ get_printer_ppd( 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, bufsize, response)) + if (cupsLastError() >= IPP_STATUS_REDIRECTION_OTHER_SITE) + { + _cupsLangPrintf(stderr, _("%s: Unable to query printer: %s"), "lpadmin", cupsLastErrorString()); + buffer[0] = '\0'; + } + else if (_ppdCreateFromIPP(buffer, bufsize, response)) { if (!cupsGetOption("printer-geo-location", *num_options, *options) && (attr = ippFindAttribute(response, "printer-geo-location", IPP_TAG_URI)) != NULL) *num_options = cupsAddOption("printer-geo-location", ippGetString(attr, 0, NULL), *num_options, options); |