The guts of the receivefile code changes.
authorJeremy Allison <jra@samba.org>
Mon, 1 Apr 2013 20:24:07 +0000 (13:24 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 19 Apr 2013 21:11:15 +0000 (14:11 -0700)
commit53b87f2fbabe3a2dcb5df6f6c494ef332bea81e7
treea8302e62a554d6ea833a99ed47636a440875c54e
parentfdcaf0fa360b9590114605d24af545b1d42b9fd5
The guts of the receivefile code changes.

If an incoming PDU might qualify, only read
SMBD_SMB2_SHORT_RECEIVEFILE_WRITE_LEN = (SMB2_HEADER + SMB2_WRITE_BODY_LEN)
bytes rather than the whole PDU.

Next time we're called, use is_smb2_recvfile_write() to decide if
this is an SMB2_WRITE that fit the receivefile criteria, otherwise
just read the rest of the PDU.

If we did do a short receivefile read, set up the smb2_req->smb1req->unread_bytes
value to show what bytes remain in the TCP buffers.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
source3/smbd/smb2_server.c