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.
This commit is contained in:
Michael Weghorn 2015-08-13 22:31:28 +02:00 committed by Marek Kasik
parent 3ffef0ca03
commit 838391e420

View File

@ -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 */