svn commit: samba r7857 - in branches/SAMBA_4_0/source/smb_server: .

tridge at samba.org tridge at samba.org
Fri Jun 24 00:05:42 GMT 2005


Author: tridge
Date: 2005-06-24 00:05:41 +0000 (Fri, 24 Jun 2005)
New Revision: 7857

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

Log:
improved the handling of end-of-file on sockets in the smb server


Modified:
   branches/SAMBA_4_0/source/smb_server/smb_server.c


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb_server.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb_server.c	2005-06-24 00:04:26 UTC (rev 7856)
+++ branches/SAMBA_4_0/source/smb_server/smb_server.c	2005-06-24 00:05:41 UTC (rev 7857)
@@ -101,9 +101,12 @@
 		if (NT_STATUS_IS_ERR(status)) {
 			return status;
 		}
-		if (nread == 0) {
+		if (!NT_STATUS_IS_OK(status)) {
 			return NT_STATUS_OK;
 		}
+		if (nread == 0) {
+			return NT_STATUS_END_OF_FILE;
+		}
 		req->in.size += nread;
 
 		/* when we have a full NBT header, then allocate the packet */
@@ -129,9 +132,12 @@
 	if (NT_STATUS_IS_ERR(status)) {
 		return status;
 	}
-	if (nread == 0) {
+	if (!NT_STATUS_IS_OK(status)) {
 		return NT_STATUS_OK;
 	}
+	if (nread == 0) {
+		return NT_STATUS_END_OF_FILE;
+	}
 
 	req->in.size += nread;
 



More information about the samba-cvs mailing list