[gtk+/gtk-3-16] Improve printer distinction for option retrieval



commit 6db121da89bcc6dc7bbcc511f79a3a68a831d86c
Author: Michael Weghorn <m weghorn posteo de>
Date:   Thu Aug 13 22:31:28 2015 +0200

    Improve printer distinction for option retrieval
    
    In order to retrieve the user options for a printer, the respective
    printer name is used.
    This fixes the comparison of printer names to avoid that the options of
    another printer are accidently read whose name starts with the same
    letters, but is longer (e.g. "myprinterlongername" instead of
    "myprinter").
    
    This fixes Bug 753628.

 modules/printbackends/cups/gtkprintbackendcups.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c 
b/modules/printbackends/cups/gtkprintbackendcups.c
index be14027..c920e9e 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -3964,7 +3964,7 @@ cups_parse_user_options (const char     *filename,
 
       *lineptr++ = '\0';
 
-      if (strncasecmp (name, printer_name, strlen (printer_name)) != 0)
+      if (strcasecmp (name, printer_name) != 0)
           continue;
 
       /* We found our printer, parse the options */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]