]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
cups-browsed: Always save "...-default" option entries from printers.conf
authorTill Kamppeter <till.kamppeter@gmail.com>
Thu, 15 Apr 2021 12:26:44 +0000 (14:26 +0200)
committerTill Kamppeter <till.kamppeter@gmail.com>
Fri, 16 Apr 2021 21:11:16 +0000 (23:11 +0200)
(cherry picked from commit cdd61132e1719a88dd8006c65e8e260c1aaa02e4)

NEWS
utils/cups-browsed.c

diff --git a/NEWS b/NEWS
index a9322c524350ff4709ca0731f9aa9a5d56e21262..78e0c58a557d0dc1417fc2971845d19ea0939061 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,9 @@ NEWS - OpenPrinting CUPS Filters v1.28.8 - 2021-03-25
 
 CHANGES IN V1.28.9
 
+       - cups-browsed: Always save "...-default" option entries
+         from printers.conf, regardless of presence or absense
+         of PPD file (Pull request #359).
        - cups-browsed: Start after network-online.target (Pull
          request #360).
 
index bffd1e09a98ef91de8fda5c3a86d73d12baa7752..0c3350555de4b68fd236767c1447bed18cdd01fc 100644 (file)
@@ -5648,9 +5648,7 @@ record_printer_options(const char *printer) {
               strcasecmp(key + strlen(key) - strlen(*ptr) + 1, *ptr + 1) == 0))
            break;
        if (*ptr != NULL) {
-         if (strcasecmp(key, CUPS_BROWSED_DEST_PRINTER "-default") != 0 &&
-             (ppdname == NULL ||
-              strncasecmp(key + strlen(key) - 8, "-default", 8))) {
+         if (strcasecmp(key, CUPS_BROWSED_DEST_PRINTER "-default") != 0) {
            ippAttributeString(attr, buf, sizeof(buf));
            buf[sizeof(buf) - 1] = '\0';
            c = buf;