svn commit: samba r2079 - branches/SAMBA_3_0/source/utils trunk/source/utils

gd at samba.org gd at samba.org
Thu Aug 26 21:32:49 GMT 2004


Author: gd
Date: 2004-08-26 21:32:49 +0000 (Thu, 26 Aug 2004)
New Revision: 2079

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=2079&nolog=1

Log:
Clear the publish-bit from the attributes-mask when migrating
printer-settings. publishing-info is not handled yet.

Guenther

Modified:
   branches/SAMBA_3_0/source/utils/net_rpc_printer.c
   trunk/source/utils/net_rpc_printer.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_rpc_printer.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_rpc_printer.c	2004-08-26 20:58:04 UTC (rev 2078)
+++ branches/SAMBA_3_0/source/utils/net_rpc_printer.c	2004-08-26 21:32:49 UTC (rev 2079)
@@ -2095,6 +2095,12 @@
 		   is correctly installed (incl. driver ???) */
 		init_unistr( &ctr_dst.printers_2->portname, SAMBA_PRINTER_PORT_NAME);
 
+		/* check if printer is published -> no publish-migration for the moment */
+		if (ctr_enum.printers_2[i].attributes & PRINTER_ATTRIBUTE_PUBLISHED) {
+			printf("printer on originating server was published, ignoring that\n");
+			ctr_dst.printers_2->attributes = PRINTER_ATTRIBUTE_SAMBA;
+		}
+
 		/* copy devmode (info level 2) */
 		ctr_dst.printers_2->devmode = talloc_memdup(mem_ctx, 
 			ctr_enum.printers_2[i].devmode, sizeof(DEVICEMODE));

Modified: trunk/source/utils/net_rpc_printer.c
===================================================================
--- trunk/source/utils/net_rpc_printer.c	2004-08-26 20:58:04 UTC (rev 2078)
+++ trunk/source/utils/net_rpc_printer.c	2004-08-26 21:32:49 UTC (rev 2079)
@@ -2095,6 +2095,12 @@
 		   is correctly installed (incl. driver ???) */
 		init_unistr( &ctr_dst.printers_2->portname, SAMBA_PRINTER_PORT_NAME);
 
+		/* check if printer is published -> no publish-migration for the moment */
+		if (ctr_enum.printers_2[i].attributes & PRINTER_ATTRIBUTE_PUBLISHED) {
+			printf("printer on originating server was published, ignoring that\n");
+			ctr_dst.printers_2->attributes = PRINTER_ATTRIBUTE_SAMBA;
+		}
+
 		/* copy devmode (info level 2) */
 		ctr_dst.printers_2->devmode = talloc_memdup(mem_ctx, 
 			ctr_enum.printers_2[i].devmode, sizeof(DEVICEMODE));



More information about the samba-cvs mailing list