svn commit: samba r4030 - in branches/SAMBA_3_0/source/printing: .

jerry at samba.org jerry at samba.org
Wed Dec 1 21:11:54 GMT 2004


Author: jerry
Date: 2004-12-01 21:11:54 +0000 (Wed, 01 Dec 2004)
New Revision: 4030

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4030

Log:
patch from Rob -- don't force the cups printer-make-and-model tag as the comment for autoloaded printers
Modified:
   branches/SAMBA_3_0/source/printing/print_cups.c


Changeset:
Modified: branches/SAMBA_3_0/source/printing/print_cups.c
===================================================================
--- branches/SAMBA_3_0/source/printing/print_cups.c	2004-12-01 21:01:27 UTC (rev 4029)
+++ branches/SAMBA_3_0/source/printing/print_cups.c	2004-12-01 21:11:54 UTC (rev 4030)
@@ -66,12 +66,10 @@
 	ipp_attribute_t	*attr;		/* Current attribute */
 	cups_lang_t	*language;	/* Default language */
 	char		*name,		/* printer-name attribute */
-			*make_model,	/* printer-make-and-model attribute */
 			*info;		/* printer-info attribute */
 	static const char *requested[] =/* Requested attributes */
 			{
 			  "printer-name",
-			  "printer-make-and-model",
 			  "printer-info"
 			};       
 
@@ -151,7 +149,6 @@
 		*/
 
 		name       = NULL;
-		make_model = NULL;
 		info       = NULL;
 
 		while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
@@ -160,10 +157,6 @@
 			    attr->value_tag == IPP_TAG_NAME)
 				name = attr->values[0].string.text;
 
-        		if (strcmp(attr->name, "printer-make-and-model") == 0 &&
-			    attr->value_tag == IPP_TAG_TEXT)
-				make_model = attr->values[0].string.text;
-
         		if (strcmp(attr->name, "printer-info") == 0 &&
 			    attr->value_tag == IPP_TAG_TEXT)
 				info = attr->values[0].string.text;
@@ -178,12 +171,7 @@
 		if (name == NULL)
 			break;
 
- 		if (info == NULL || !info[0])
-			(*fn)(name, make_model);
-		else
-			(*fn)(name, info);
-		
-
+		(*fn)(name, info);
 	}
 
 	ippDelete(response);
@@ -245,7 +233,6 @@
 		*/
 
 		name       = NULL;
-		make_model = NULL;
 		info       = NULL;
 
 		while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
@@ -254,10 +241,6 @@
 			    attr->value_tag == IPP_TAG_NAME)
 				name = attr->values[0].string.text;
 
-        		if (strcmp(attr->name, "printer-make-and-model") == 0 &&
-			    attr->value_tag == IPP_TAG_TEXT)
-				make_model = attr->values[0].string.text;
-
         		if (strcmp(attr->name, "printer-info") == 0 &&
 			    attr->value_tag == IPP_TAG_TEXT)
 				info = attr->values[0].string.text;
@@ -272,12 +255,7 @@
 		if (name == NULL)
 			break;
 
- 		if (info == NULL || !info[0])
-			(*fn)(name, make_model);
-		else
-			(*fn)(name, info);
-		
-
+		(*fn)(name, info);
 	}
 
 	ippDelete(response);



More information about the samba-cvs mailing list