[gtk+] Improve printer distinction for option retrieval
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Improve printer distinction for option retrieval
- Date: Fri, 11 Sep 2015 13:19:58 +0000 (UTC)
commit 838391e420a0d2bf274e63a590791257ba655cbf
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 242ba3a..44868dd 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -3981,7 +3981,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]