]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix support for simple punch finisher (Issue #821)
authorMichael R Sweet <msweet@msweet.org>
Wed, 17 Apr 2024 00:08:57 +0000 (20:08 -0400)
committerMichael R Sweet <msweet@msweet.org>
Wed, 17 Apr 2024 00:08:57 +0000 (20:08 -0400)
CHANGES.md
cups/ppd-cache.c

index 13226c3f1e3b4e8aae6a65bc2b453f48f5cb38fb..28df48d74bd03713bec70fd8eef0646d11314894 100644 (file)
@@ -61,6 +61,7 @@ Changes in CUPS v2.5b1 (TBA)
 - Fixed printing to stderr if we can't open cups-files.conf (Issue #777)
 - Fixed memory leak when unloading a job (Issue #813)
 - Fixed memory leak when creating color profiles (Issue #814)
+- Fixed punch finisher support for IPP Everywhere printers (Issue #821)
 - Fixed crash in `scan_ps()` if incoming argument is NULL (Issue #831)
 - Fixed setting job state reasons for successful jobs (Issue #832)
 - Fixed infinite loop in IPP backend if hostname is IP address with Kerberos
index 93ea0034cce7d8854bcf098c96f8bbdb3b5b1d76..29ba78fa0c33e9759cc34cb4f130b2768554ba60 100644 (file)
@@ -4516,11 +4516,11 @@ _ppdCreateFromIPP(char   *buffer,       /* I - Filename buffer */
 
       cupsArrayAdd(fin_options, "*StapleLocation");
 
-      cupsFilePrintf(fp, "*OpenUI *StapleLocation/%s: PickOne\n", _cupsLangString(base_lang, "finishing.4"));
+      cupsFilePrintf(fp, "*OpenUI *StapleLocation/%s: PickOne\n", _cupsLangString(base_lang, "finishings.4"));
       cupsFilePuts(fp, "*OrderDependency: 10 AnySetup *StapleLocation\n");
       ppd_put_strings(fp, langs, "Translation", "StapleLocation", "finishings.4");
       cupsFilePuts(fp, "*DefaultStapleLocation: None\n");
-      cupsFilePrintf(fp, "*StapleLocation None/%s: \"\"\n", _cupsLangString(base_lang, "finishing.3"));
+      cupsFilePrintf(fp, "*StapleLocation None/%s: \"\"\n", _cupsLangString(base_lang, "finishings.3"));
       ppd_put_strings(fp, langs, "StapleLocation", "None", "finishings.3");
 
       for (; i < count; i ++)
@@ -4644,7 +4644,7 @@ _ppdCreateFromIPP(char   *buffer, /* I - Filename buffer */
       value   = ippGetInteger(attr, i);
       keyword = ippEnumString("finishings", value);
 
-      if (!strncmp(keyword, "cups-punch-", 11) || !strncmp(keyword, "punch-", 6))
+      if (!strcmp(keyword, "punch") || !strncmp(keyword, "cups-punch-", 11) || !strncmp(keyword, "punch-", 6))
         break;
     }
 
@@ -4690,7 +4690,7 @@ _ppdCreateFromIPP(char   *buffer, /* I - Filename buffer */
 
         if (!strncmp(keyword, "cups-punch-", 11))
           keyword += 5;
-        else if (strncmp(keyword, "punch-", 6))
+        else if (strcmp(keyword, "punch") && strncmp(keyword, "punch-", 6))
           continue;
 
         if (cupsArrayFind(names, (char *)keyword))