[prev in list] [next in list] [prev in thread] [next in thread]
List: cups-bugs
Subject: Re: [cups.bugs] [LOW] STR #3631: lpadmin -o key=value fails for two
From: Michael Sweet <msweet () apple ! com>
Date: 2010-08-13 0:29:59
Message-ID: 20100813002959.A7FD03C68427 () dns ! easysw ! com
[Download RAW message or body]
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR Closed w/Resolution]
Fixed in Subversion repository.
Link: http://www.cups.org/str.php?L3631
Version: 1.4.4
Fix Version: 1.5-current (r9246)
["str3631.patch" (text/plain)]
Index: systemv/lpadmin.c
===================================================================
--- systemv/lpadmin.c (revision 9245)
+++ systemv/lpadmin.c (working copy)
@@ -1129,8 +1129,8 @@
tempfile[1024]; /* Temporary filename */
cups_file_t *in, /* PPD file */
*out; /* Temporary file */
- int outfd; /* Temporary file descriptor */
- const char *protocol; /* Old protocol option */
+ const char *protocol, /* Old protocol option */
+ *customval; /* Custom option value */
DEBUG_printf(("set_printer_options(http=%p, printer=\"%s\", num_options=%d, "
@@ -1290,8 +1290,19 @@
if (choice && strcmp(choice->choice, keyptr))
{
- cupsFilePrintf(out, "*Default%s: %s\n", keyword, choice->choice);
- ppdchanged = 1;
+ if (strcmp(choice->choice, "Custom"))
+ {
+ cupsFilePrintf(out, "*Default%s: %s\n", keyword, choice->choice);
+ ppdchanged = 1;
+ }
+ else if ((customval = cupsGetOption(keyword, num_options,
+ options)) != NULL)
+ {
+ cupsFilePrintf(out, "*Default%s: %s\n", keyword, customval);
+ ppdchanged = 1;
+ }
+ else
+ cupsFilePrintf(out, "%s\n", line);
}
else
cupsFilePrintf(out, "%s\n", line);
_______________________________________________
cups-bugs mailing list
cups-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/cups-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic