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