From 62d43bb80f8ce5eeae0c71d081532a0be9ff2983 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 26 May 2023 14:05:00 +0200 Subject: [PATCH] ppd/ppd-ipp.c: Use make when constructing printer-make-model attr We used only PPD Nickname which does not contain manufacturer in some drivers (like Utax) when constructing printer-make-and-model IPP attribute, and then used the attribute when matching with strings representing manufacturers in filter functions. This caused internal hacks for specific printer manufacturers weren't applied, causing breakage during printing. --- ppd/ppd-ipp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ppd/ppd-ipp.c b/ppd/ppd-ipp.c index 59556242..374e8a8e 100644 --- a/ppd/ppd-ipp.c +++ b/ppd/ppd-ipp.c @@ -1381,8 +1381,11 @@ ppdLoadAttributes( } // printer-make-andXS-model + char make_model[128]; // Manufacturer and Model value + + snprintf(make_model, sizeof(make_model), "%s %s", ppd->manufacturer, ppd->nickname); ippAddString(attrs, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-make-and-model", - NULL, ppd->nickname); + NULL, make_model); // printer-resolution-default ippAddResolution(attrs, IPP_TAG_PRINTER, "printer-resolution-default",