svn commit: samba r18579 - in branches/SAMBA_4_0/source/param: .

tridge at samba.org tridge at samba.org
Sat Sep 16 14:58:51 GMT 2006


Author: tridge
Date: 2006-09-16 14:58:51 +0000 (Sat, 16 Sep 2006)
New Revision: 18579

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

Log:

fixed boolean parameters on big endian hosts which have 
sizeof(BOOL) != sizeof(int)

this broke with the conversion to a real BOOL type

Modified:
   branches/SAMBA_4_0/source/param/loadparm.c


Changeset:
Modified: branches/SAMBA_4_0/source/param/loadparm.c
===================================================================
--- branches/SAMBA_4_0/source/param/loadparm.c	2006-09-16 05:07:36 UTC (rev 18578)
+++ branches/SAMBA_4_0/source/param/loadparm.c	2006-09-16 14:58:51 UTC (rev 18579)
@@ -1861,11 +1861,14 @@
 	/* now switch on the type of variable it is */
 	switch (parm_table[parmnum].type)
 	{
-		case P_BOOL:
-			if (!set_boolean(pszParmValue, parm_ptr)) {
+		case P_BOOL: {
+			BOOL b;
+			if (!set_boolean(pszParmValue, &b)) {
 				DEBUG(0,("lp_do_parameter(%s): value is not boolean!\n", pszParmValue));
 				return False;
 			}
+			*(int *)parm_ptr = b;
+			}
 			break;
 
 		case P_INTEGER:



More information about the samba-cvs mailing list