Planning 3.0alpha21 for Friday (10/25)

Urban Widmark urban at teststation.com
Wed Oct 23 22:11:01 GMT 2002


On Wed, 23 Oct 2002, Gerald (Jerry) Carter wrote:

> Just giving everyone a heads up.  I will also roll RPMS
> for the various RedHat versions on this release.

Any chance of someone reviewing and possibly adding these changes before
then? I first posted this on the 19th.

3 changes smbmount wants in samba:

1) Allow an application to control if CAP_LARGE_FILES is set in the
   client capabilities.

2) Make strchr_m and strrchr_m efficient for the common case of searching for
   an ascii character, using the same reasoning as in strlower_m.
   The conversions done in strchr_m are kind of expensive ...

3) strchr_w(ws, UCS2_CHAR('\0')) doesn't find the end of the string,
   and that makes strchr_m(string, '\0') fail. (2) fixes that, but I'm
   guessing strchar_w is also supposed to work like strchr does.

/Urban


diff -urN -X exclude samba-3_0.old/source/libsmb/cliconnect.c samba-3_0/source/libsmb/cliconnect.c
--- samba-3_0.old/source/libsmb/cliconnect.c	Thu Oct 17 19:10:24 2002
+++ samba-3_0/source/libsmb/cliconnect.c	Sat Oct 19 12:13:30 2002
@@ -124,6 +124,9 @@
 	if (cli->capabilities & CAP_UNICODE)
 		capabilities |= CAP_UNICODE;
 
+	if (cli->capabilities & CAP_LARGE_FILES)
+		capabilities |= CAP_LARGE_FILES;
+
 	return capabilities;
 }
 
diff -urN -X exclude samba-3_0.old/source/lib/util_str.c samba-3_0/source/lib/util_str.c
--- samba-3_0.old/source/lib/util_str.c	Wed Oct  2 21:12:14 2002
+++ samba-3_0/source/lib/util_str.c	Sat Oct 19 16:46:34 2002
@@ -990,6 +990,9 @@
 	pstring s2;
 	smb_ucs2_t *p;
 
+	if (!(c & 0x80))
+		return strchr(s, c);	/* ascii */
+
 	push_ucs2(NULL, ws, s, sizeof(ws), STR_TERMINATE);
 	p = strchr_w(ws, UCS2_CHAR(c));
 	if (!p)
@@ -1005,6 +1008,9 @@
 	pstring s2;
 	smb_ucs2_t *p;
 
+	if (!(c & 0x80))
+		return strchr(s, c);	/* ascii */
+
 	push_ucs2(NULL, ws, s, sizeof(ws), STR_TERMINATE);
 	p = strrchr_w(ws, UCS2_CHAR(c));
 	if (!p)
diff -urN -X exclude samba-3_0.old/source/lib/util_unistr.c samba-3_0/source/lib/util_unistr.c
--- samba-3_0.old/source/lib/util_unistr.c	Wed Sep 25 17:18:52 2002
+++ samba-3_0/sourcelib/util_unistr.c/	Sat Oct 19 20:45:34 2002
@@ -335,6 +335,7 @@
 		if (c == *s) return (smb_ucs2_t *)s;
 		s++;
 	}
+	if (c == *s) return (smb_ucs2_t *)s;
 	return NULL;
 }
 




More information about the samba-technical mailing list