From b6d5d02aa1bf0caa28343dc87444f049c5fd8ce5 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Fri, 15 Feb 2002 22:20:08 +0000 Subject: [PATCH 1/1] Back out 1.16.2.3: receive_smb: You might think that we ought to set smb_read_error here, but apparently that breaks the recursive main loop in oplock.c. Global variables suck. :-/ --- source/lib/util_sock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index daab7933daa..45beb38ac9e 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -663,7 +663,11 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout) len = read_smb_length_return_keepalive(fd,buffer,timeout); if (len < 0) { DEBUG(10,("receive_smb: length < 0!\n")); - return(False); + /* XXX: You might think that we ought to set + * smb_read_error here, but apparently that breaks the + * recursive main loop in oplock.c. Global variables + * suck. */ + return False; } /* -- 2.34.1