From: msweet Date: Wed, 7 Oct 2015 20:28:20 +0000 (+0000) Subject: Fix cupsGetPPD* with IPP print queues (STR #4725) X-Git-Tag: v2.2b1~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd37b5bcf97db7069826a807892736e912b7e935;p=thirdparty%2Fcups.git Fix cupsGetPPD* with IPP print queues (STR #4725) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12883 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES-2.1.txt b/CHANGES-2.1.txt index 701cdeb484..89bccfcd94 100644 --- a/CHANGES-2.1.txt +++ b/CHANGES-2.1.txt @@ -3,6 +3,7 @@ CHANGES-2.1.txt CHANGES IN CUPS V2.1.1 + - The cupsGetPPD* functions did not work with IPP printers (STR #4725) - Some older HP LaserJet printers need a delayed close when printing using the libusb-based USB backend (STR #4549) - The libusb-based USB backend did not unload the kernel usblp module diff --git a/cups/util.c b/cups/util.c index 7b70b15db5..839bbf9992 100644 --- a/cups/util.c +++ b/cups/util.c @@ -1528,10 +1528,9 @@ cups_get_printer_uri( } if (device_uri && - (!strncmp(device_uri, "ipp://", 6) || - !strncmp(device_uri, "ipps://", 7) || - ((strstr(device_uri, "._ipp.") != NULL || - strstr(device_uri, "._ipps.") != NULL) && + (((!strncmp(device_uri, "ipp://", 6) || !strncmp(device_uri, "ipps://", 7)) && + (strstr(device_uri, "/printers/") != NULL || strstr(device_uri, "/classes/") != NULL)) || + ((strstr(device_uri, "._ipp.") != NULL || strstr(device_uri, "._ipps.") != NULL) && !strcmp(device_uri + strlen(device_uri) - 5, "/cups")))) { /*