]> git.ipfire.org Git - thirdparty/cups.git/commit
Fix conversion of PPD InputSlot choice names 23/head
authorTill Kamppeter <till.kamppeter@gmail.com>
Mon, 17 Feb 2020 08:05:58 +0000 (09:05 +0100)
committerDidier Raboud <odyx@debian.org>
Wed, 4 Nov 2020 15:40:48 +0000 (16:40 +0100)
commit265fe175659e569f8fb812712c266272475b7b1a
tree0121eda478278f4966b8462fc08171292b1d2dc3
parent309faf21585fc826b97e4956ba7db0793991e3f1
Fix conversion of PPD InputSlot choice names

When I create a CUPS queue with a PPD file with choice names "Tray-1", "Tray-2",
... in the InputSlot option CUPS translates these names to double-dashed IPP
attribute names: "tray--1", "tray--2", ... in the "media-source" attribute, both
when passing a job to the printer with the IPP backend, making the printer
ignore the tray choice, and also when answering a get-printer-attributes IPP
request from a client. This happens when in the PPD a dash is followed by a
digit, as the pwg_unppdize_name() function in cups/ppd-cache.c inserts a dash
whenever a non-digit is followed by a digit in the PPD name. As IPP attribute
names generally never have double-dashes and also no dashes in the beginning or
the end of the name, I have modified the pwg_unppdize_name() function
appropriately.

Bug: https://github.com/apple/cups/issues/5740
Bug-Debian: https://bugs.debian.org/949315
cups/ppd-cache.c