little fix to receive_smb()

Rafal Szczesniak mimir at diament.ists.pwr.wroc.pl
Sat Aug 24 11:17:00 GMT 2002


It would be nice if someone (from the team, of course) could
apply this simple fix. Previous code was breaking netbios
session setup (receiving positive response).


-- 
cheers,
+------------------------------------------------------------+
|Rafal 'Mimir' Szczesniak <mimir at diament.ists.pwr.wroc.pl>   |
|*BSD, GNU/Linux and Samba                                  /
|__________________________________________________________/
-------------- next part --------------
Index: util_sock.c
===================================================================
RCS file: /cvsroot/samba/source/lib/util_sock.c,v
retrieving revision 1.69
diff -u -r1.69 util_sock.c
--- util_sock.c	23 Aug 2002 15:01:07 -0000	1.69
+++ util_sock.c	24 Aug 2002 15:09:57 -0000
@@ -585,8 +585,8 @@
 	memset(buffer,'\0',smb_size + 100);
 
 	len = read_smb_length_return_keepalive(fd,buffer,timeout);
-	if (len < 0 || len == 0) {
-		DEBUG(10,("receive_smb: length < 0 or == 0!\n"));
+	if (len < 0) {
+		DEBUG(10,("receive_smb: length < 0!\n"));
 
 		/*
 		 * Correct fix. smb_read_error may have already been


More information about the samba-technical mailing list