]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge fix for #859 from master
authorZdenek Dohnal <zdohnal@redhat.com>
Mon, 15 Jan 2024 13:14:08 +0000 (14:14 +0100)
committerZdenek Dohnal <zdohnal@redhat.com>
Mon, 15 Jan 2024 13:14:08 +0000 (14:14 +0100)
CHANGES.md
cups/ppd-cache.c

index 7ab6ca8952c9f71e81e784e04b5d56532576e226..b1594a67a37c8ee0d639078dc179b65efc05e253 100644 (file)
@@ -35,6 +35,8 @@ Changes in CUPS v2.4.7 (2023-09-20)
 - Fixed purging job files via `cancel -x` (Issue #742)
 - Fixed RFC 1179 port reserving behavior in LPD backend (Issue #743)
 - Fixed a bug in the PPD command interpretation code (Issue #768)
+- Fixed reporting `media-source-supported` when sharing printer which has numbers as strings
+  instead of keywords as `InputSlot` values (Issue #859)
 
 
 Changes in CUPS v2.4.6 (2023-06-22)
index b87cfb79870e26297c109fd24873c0312dd6a5d6..d664812a2b395a14d4d0905a98407ed0adc34c86 100644 (file)
@@ -1311,7 +1311,9 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd)   /* I - PPD file */
         i --, choice ++, map ++)
     {
       if (!_cups_strncasecmp(choice->choice, "Auto", 4) ||
-          !_cups_strcasecmp(choice->choice, "Default"))
+          !_cups_strncasecmp(choice->text, "Auto", 4) ||
+          !_cups_strcasecmp(choice->choice, "Default") ||
+          !_cups_strcasecmp(choice->text, "Default"))
         pwg_name = "auto";
       else if (!_cups_strcasecmp(choice->choice, "Cassette"))
         pwg_name = "main";
@@ -1335,6 +1337,26 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd)  /* I - PPD file */
         pwg_name = "side";
       else if (!_cups_strcasecmp(choice->choice, "Roll"))
         pwg_name = "main-roll";
+      else if (!_cups_strcasecmp(choice->choice, "0"))
+        pwg_name = "tray-1";
+      else if (!_cups_strcasecmp(choice->choice, "1"))
+        pwg_name = "tray-2";
+      else if (!_cups_strcasecmp(choice->choice, "2"))
+        pwg_name = "tray-3";
+      else if (!_cups_strcasecmp(choice->choice, "3"))
+        pwg_name = "tray-4";
+      else if (!_cups_strcasecmp(choice->choice, "4"))
+        pwg_name = "tray-5";
+      else if (!_cups_strcasecmp(choice->choice, "5"))
+        pwg_name = "tray-6";
+      else if (!_cups_strcasecmp(choice->choice, "6"))
+        pwg_name = "tray-7";
+      else if (!_cups_strcasecmp(choice->choice, "7"))
+        pwg_name = "tray-8";
+      else if (!_cups_strcasecmp(choice->choice, "8"))
+        pwg_name = "tray-9";
+      else if (!_cups_strcasecmp(choice->choice, "9"))
+        pwg_name = "tray-10";
       else
       {
        /*