rpms/cups/devel cups-str3418.patch,NONE,1.1 cups.spec,1.541,1.542

Tim Waugh twaugh at fedoraproject.org
Tue Nov 17 13:26:08 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/cups/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10555

Modified Files:
	cups.spec 
Added Files:
	cups-str3418.patch 
Log Message:
* Tue Nov 17 2009 Tim Waugh <twaugh at redhat.com> 1:1.4.2-6
- Fixed display of current driver (bug #537182, STR #3418).


cups-str3418.patch:
 cgi-bin/admin.c |   23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

--- NEW FILE cups-str3418.patch ---
diff -up cups-1.4.2/cgi-bin/admin.c.str3418 cups-1.4.2/cgi-bin/admin.c
--- cups-1.4.2/cgi-bin/admin.c.str3418	2009-11-17 13:23:51.130084685 +0000
+++ cups-1.4.2/cgi-bin/admin.c	2009-11-17 13:23:56.773209143 +0000
@@ -1261,7 +1261,7 @@ do_am_printer(http_t *http,		/* I - HTTP
       * Got the list of PPDs, see if the user has selected a make...
       */
 
-      if (cgiSetIPPVars(response, NULL, NULL, NULL, 0) == 0)
+      if (cgiSetIPPVars(response, NULL, NULL, NULL, 0) == 0 && !modify)
       {
        /*
         * No PPD files with this make, try again with all makes...
@@ -1297,8 +1297,11 @@ do_am_printer(http_t *http,		/* I - HTTP
 	*/
 
         cgiStartHTML(title);
-	cgiSetVariable("CURRENT_MAKE_AND_MODEL",
-	               cgiGetArray("PPD_MAKE_AND_MODEL", 0));
+	if (!cgiGetVariable("PPD_MAKE"))
+	  cgiSetVariable("PPD_MAKE", cgiGetVariable("CURRENT_MAKE"));
+	if (!modify)
+	  cgiSetVariable("CURRENT_MAKE_AND_MODEL",
+	                 cgiGetArray("PPD_MAKE_AND_MODEL", 0));
 	cgiCopyTemplateLang("choose-model.tmpl");
         cgiEndHTML();
       }
@@ -1590,7 +1593,7 @@ do_config_server(http_t *http)		/* I - H
 #ifdef HAVE_GSSAPI
     char		default_auth_type[255];
 					/* DefaultAuthType value */
-    const char		*val;		/* Setting value */ 
+    const char		*val;		/* Setting value */
 #endif /* HAVE_GSSAPI */
 
 
@@ -1662,7 +1665,7 @@ do_config_server(http_t *http)		/* I - H
 	  strcat(local_protocols, "slp");
       }
 #endif /* HAVE_SLP */
-      
+
       if (cgiGetVariable("BROWSE_REMOTE_CUPS"))
 	strcpy(remote_protocols, "cups");
       else
@@ -1915,7 +1918,7 @@ do_config_server(http_t *http)		/* I - H
       cgiSetVariable("ERROR", strerror(errno));
       cgiCopyTemplateLang("error.tmpl");
       cgiEndHTML();
-      
+
       perror(tempfile);
       return;
     }
@@ -1927,7 +1930,7 @@ do_config_server(http_t *http)		/* I - H
       cgiSetVariable("ERROR", strerror(errno));
       cgiCopyTemplateLang("error.tmpl");
       cgiEndHTML();
-      
+
       perror(tempfile);
       close(tempfd);
       unlink(tempfile);
@@ -3342,7 +3345,7 @@ do_set_options(http_t *http,		/* I - HTT
           ((ppdattr = ppdFindAttr(ppd, "cupsCommands", NULL)) != NULL &&
            ppdattr->value && strstr(ppdattr->value, "AutoConfigure")))
         cgiSetVariable("HAVE_AUTOCONFIGURE", "YES");
-      else 
+      else
       {
         for (i = 0; i < ppd->num_filters; i ++)
 	  if (!strncmp(ppd->filters[i], "application/vnd.cups-postscript", 31))
@@ -3446,7 +3449,7 @@ do_set_options(http_t *http,		/* I - HTT
 	  cgiSetVariable("GROUP", group->text);
 
 	cgiCopyTemplateLang("option-header.tmpl");
-	
+
 	for (j = group->num_options, option = group->options;
 	     j > 0;
 	     j --, option ++)
@@ -4090,7 +4093,7 @@ get_option_value(
 
     snprintf(buffer, bufsize, "Custom.%gx%g%s", width, length, uval);
   }
-  else if (cupsArrayCount(coption->params) == 1) 
+  else if (cupsArrayCount(coption->params) == 1)
   {
     cparam = ppdFirstCustomParam(coption);
     snprintf(keyword, sizeof(keyword), "%s.%s", coption->keyword, cparam->name);
diff -up cups-1.4.2/CHANGES-1.4.txt.str3418 cups-1.4.2/CHANGES-1.4.txt


Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups.spec,v
retrieving revision 1.541
retrieving revision 1.542
diff -u -p -r1.541 -r1.542
--- cups.spec	17 Nov 2009 13:14:28 -0000	1.541
+++ cups.spec	17 Nov 2009 13:26:07 -0000	1.542
@@ -56,6 +56,7 @@ Patch30: cups-str3381.patch
 Patch31: cups-str3399.patch
 Patch32: cups-str3403.patch
 Patch33: cups-str3407.patch
+Patch34: cups-str3418.patch
 
 Patch100: cups-lspp.patch
 
@@ -222,6 +223,7 @@ module. 
 %patch31 -p1 -b .str3399
 %patch32 -p1 -b .str3403
 %patch33 -p1 -b .str3407
+%patch34 -p1 -b .str3418
 
 %if %lspp
 %patch100 -p1 -b .lspp
@@ -515,6 +517,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %changelog
 * Tue Nov 17 2009 Tim Waugh <twaugh at redhat.com> 1:1.4.2-6
+- Fixed display of current driver (bug #537182, STR #3418).
 - Fixed out-of-memory handling when loading jobs (bug #538054,
   STR #3407).
 




More information about the fedora-extras-commits mailing list