]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
ppd-cache.c: Check for `urf-supported` if `image/urf` is found
authorZdenek Dohnal <zdohnal@redhat.com>
Tue, 13 Feb 2024 07:20:52 +0000 (08:20 +0100)
committerZdenek Dohnal <zdohnal@redhat.com>
Wed, 14 Feb 2024 14:38:49 +0000 (15:38 +0100)
Some devices have `image/urf` in `document-format-supported`, but is
missing `urf-supported` if AirPrint support is turned off, which breaks
PPD generation.

Check for attribute `urf-supported` when we are about to decide whether
the printer uses AirPrint, so in case the device supports another
driverless standard, we can use it for PPD generation.

Fixes [Fedora issue](https://bugzilla.redhat.com/show_bug.cgi?id=2263053)

cups/ppd-cache.c

index 523e4dfc8fc8bf112b1bb4a2db9f760afbd3bc55..737e872912137cf02d31f61b7bd6d73a7555e0c2 100644 (file)
@@ -3435,7 +3435,7 @@ _ppdCreateFromIPP2(
 
   if ((attr = ippFindAttribute(supported, "document-format-supported", IPP_TAG_MIMETYPE)) != NULL)
   {
-    is_apple = ippContainsString(attr, "image/urf");
+    is_apple = ippContainsString(attr, "image/urf") && (ippFindAttribute(supported, "urf-supported", IPP_TAG_KEYWORD) != NULL);
     is_pdf   = ippContainsString(attr, "application/pdf");
     is_pwg   = ippContainsString(attr, "image/pwg-raster") && !is_apple;