svn commit: samba r21164 - in branches: SAMBA_3_0/source/rpc_server SAMBA_3_0_25/source/rpc_server

jra at samba.org jra at samba.org
Mon Feb 5 19:32:31 GMT 2007


Author: jra
Date: 2007-02-05 19:32:31 +0000 (Mon, 05 Feb 2007)
New Revision: 21164

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

Log:
Fix from Martin Zielinski <mz at seh.de> for EnumprinterdataEX
on Vista.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
   branches/SAMBA_3_0_25/source/rpc_server/srv_spoolss_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c	2007-02-05 18:44:55 UTC (rev 21163)
+++ branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c	2007-02-05 19:32:31 UTC (rev 21164)
@@ -9521,6 +9521,15 @@
 	
 	/* housekeeping information in the reply */
 	
+	/* Fix from Martin Zielinski <mz at seh.de> - ensure
+	 * the hand marshalled container size is a multiple
+	 * of 4 bytes for RPC alignment.
+	 */
+
+	if (needed % 4) {
+		needed += 4-(needed % 4);
+	}
+
 	r_u->needed 	= needed;
 	r_u->returned 	= num_entries;
 
@@ -9533,15 +9542,6 @@
 	
 	r_u->ctr.size        	= r_u->needed;
 
-	/* Fix from Martin Zielinski <mz at seh.de> - ensure
-	 * the hand marshalled container size is a multiple
-	 * of 4 bytes for RPC alignment.
-	 */
-
-	if (needed % 4) {
-		r_u->ctr.size += 4-(needed % 4);
-	}
-
 	r_u->ctr.size_of_array 	= r_u->returned;
 	r_u->ctr.values 	= enum_values;
 	

Modified: branches/SAMBA_3_0_25/source/rpc_server/srv_spoolss_nt.c
===================================================================
--- branches/SAMBA_3_0_25/source/rpc_server/srv_spoolss_nt.c	2007-02-05 18:44:55 UTC (rev 21163)
+++ branches/SAMBA_3_0_25/source/rpc_server/srv_spoolss_nt.c	2007-02-05 19:32:31 UTC (rev 21164)
@@ -9385,6 +9385,15 @@
 	
 	/* housekeeping information in the reply */
 	
+	/* Fix from Martin Zielinski <mz at seh.de> - ensure
+	 * the hand marshalled container size is a multiple
+	 * of 4 bytes for RPC alignment.
+	 */
+
+	if (needed % 4) {
+		needed += 4-(needed % 4);
+	}
+
 	r_u->needed 	= needed;
 	r_u->returned 	= num_entries;
 
@@ -9397,15 +9406,6 @@
 	
 	r_u->ctr.size        	= r_u->needed;
 
-	/* Fix from Martin Zielinski <mz at seh.de> - ensure
-	 * the hand marshalled container size is a multiple
-	 * of 4 bytes for RPC alignment.
-	 */
-
-	if (needed % 4) {
-		r_u->ctr.size += 4-(needed % 4);
-	}
-
 	r_u->ctr.size_of_array 	= r_u->returned;
 	r_u->ctr.values 	= enum_values;
 	



More information about the samba-cvs mailing list