diff -up cups-1.4.2/cgi-bin/admin.c.str3439 cups-1.4.2/cgi-bin/admin.c
--- cups-1.4.2/cgi-bin/admin.c.str3439 2009-12-08 10:03:36.412157983 +0000
+++ cups-1.4.2/cgi-bin/admin.c 2009-12-08 10:03:41.659157246 +0000
@@ -3320,11 +3320,16 @@ do_set_options(http_t *http, /* I - HTT
for (option = ppdFirstOption(ppd);
option;
option = ppdNextOption(ppd))
+ {
if ((var = cgiGetVariable(option->keyword)) != NULL)
{
have_options = 1;
ppdMarkOption(ppd, option->keyword, var);
+ fprintf(stderr, "DEBUG: Set %s to %s...\n", option->keyword, var);
}
+ else
+ fprintf(stderr, "DEBUG: Didn't find %s...\n", option->keyword);
+ }
}
if (!have_options || ppdConflicts(ppd))
diff -up cups-1.4.2/cups/conflicts.c.str3439 cups-1.4.2/cups/conflicts.c
--- cups-1.4.2/cups/conflicts.c.str3439 2009-05-18 23:55:15.000000000 +0100
+++ cups-1.4.2/cups/conflicts.c 2009-12-08 10:03:41.657157719 +0000
@@ -583,9 +583,13 @@ ppdConflicts(ppd_file_t *ppd) /* I - PP
* Clear all conflicts...
*/
+ cupsArraySave(ppd->options);
+
for (o = ppdFirstOption(ppd); o; o = ppdNextOption(ppd))
o->conflicted = 0;
+ cupsArrayRestore(ppd->options);
+
/*
* Test for conflicts...
*/
diff -up cups-1.4.2/cups/mark.c.str3439 cups-1.4.2/cups/mark.c
--- cups-1.4.2/cups/mark.c.str3439 2009-04-20 22:37:14.000000000 +0100
+++ cups-1.4.2/cups/mark.c 2009-12-08 10:03:41.656157620 +0000
@@ -842,6 +842,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
if (!strcasecmp(option, "AP_D_InputSlot"))
{
+ cupsArraySave(ppd->options);
+
if ((o = ppdFindOption(ppd, "InputSlot")) != NULL)
{
key.option = o;
@@ -851,13 +853,21 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
cupsArrayRemove(ppd->marked, oldc);
}
}
+
+ cupsArrayRestore(ppd->options);
}
/*
* Check for custom options...
*/
- if ((o = ppdFindOption(ppd, option)) == NULL)
+ cupsArraySave(ppd->options);
+
+ o = ppdFindOption(ppd, option);
+
+ cupsArrayRestore(ppd->options);
+
+ if (!o)
return;
loc = localeconv();
@@ -1060,6 +1070,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
* appropriate...
*/
+ cupsArraySave(ppd->options);
+
if (!strcasecmp(option, "PageSize"))
{
if ((o = ppdFindOption(ppd, "PageRegion")) != NULL)
@@ -1084,6 +1096,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
}
}
}
+
+ cupsArrayRestore(ppd->options);
}
else if (!strcasecmp(option, "InputSlot"))
{
@@ -1091,6 +1105,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
* Unmark ManualFeed option...
*/
+ cupsArraySave(ppd->options);
+
if ((o = ppdFindOption(ppd, "ManualFeed")) != NULL)
{
key.option = o;
@@ -1100,6 +1116,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
cupsArrayRemove(ppd->marked, oldc);
}
}
+
+ cupsArrayRestore(ppd->options);
}
else if (!strcasecmp(option, "ManualFeed") &&
!strcasecmp(choice, "True"))
@@ -1108,6 +1126,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
* Unmark InputSlot option...
*/
+ cupsArraySave(ppd->options);
+
if ((o = ppdFindOption(ppd, "InputSlot")) != NULL)
{
key.option = o;
@@ -1117,6 +1137,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I -
cupsArrayRemove(ppd->marked, oldc);
}
}
+
+ cupsArrayRestore(ppd->options);
}
}