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