]> git.ipfire.org Git - thirdparty/cups.git/commit
Fix duplicate PPD->IPP media-type name mappings 688/head
authorBryan Cain <bryancain@chromium.org>
Fri, 12 May 2023 17:23:24 +0000 (11:23 -0600)
committerBryan Cain <bryancain@chromium.org>
Wed, 24 May 2023 17:22:45 +0000 (11:22 -0600)
commit55f5b24b87bfe941f6e50dc56c76388cb634df63
treee0f3929befbdee46e8d459dfdfa23b72f91eba3f
parentbae9c6e7e5e18050a73aa936a9a7a117f9bcf6e1
Fix duplicate PPD->IPP media-type name mappings

If more than one MediaType in a PPD matched the pattern for a registered
PWG media-type name, they would all be mapped to that name, making it
impossible for a client using CUPS' IPP interface to distinguish between
them or specify a particular one.

This comes up with Epson-provided PPDs, which frequently hit this case
by combining print quality with media type like so:
*MediaType PLAIN_HIGH/Plain paper-High: "
*MediaType PLAIN_NORMAL/Plain paper-Standard: "

Solve this problem by not assigning the standard PWG name to either one
when such duplication occurs.
cups/ppd-cache.c