1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00

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

This commit is contained in:
Andrew Tridgell 2005-06-24 00:05:41 +00:00 committed by Gerald (Jerry) Carter
parent c435843c66
commit 6ee98c5f65

View File

@ -101,9 +101,12 @@ static NTSTATUS receive_smb_request(struct smbsrv_connection *smb_conn)
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 @@ static NTSTATUS receive_smb_request(struct smbsrv_connection *smb_conn)
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;