The guts of the receivefile code changes.
commitcd0da2355fb41bbb260a774b05fda841fd297208
authorJeremy Allison <jra@samba.org>
Mon, 1 Apr 2013 20:24:07 +0000 (1 13:24 -0700)
committerKarolin Seeger <kseeger@samba.org>
Thu, 25 Apr 2013 10:50:59 +0000 (25 12:50 +0200)
tree907566c9f2692a058b038cfc4ddb5e28a858dec8
parent0d190cfcb247c7d311971777cce00b3b1683d916
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>
(cherry picked from commit 53b87f2fbabe3a2dcb5df6f6c494ef332bea81e7)
source3/smbd/smb2_server.c