summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-04-01 13:17:09 -0700
committerJeremy Allison <jra@samba.org>2013-04-19 14:11:07 -0700
commit4b91097002d73ae5dd2d4ac225f8e9eecca11e49 (patch)
treedf9e54996fd8c9bb29b55c910fbc5e64cf8d62c9
parent36d4b9d208c0025f054ad8ae4062ca3c81e345d5 (diff)
downloadsamba-4b91097002d73ae5dd2d4ac225f8e9eecca11e49.tar.gz
samba-4b91097002d73ae5dd2d4ac225f8e9eecca11e49.tar.bz2
samba-4b91097002d73ae5dd2d4ac225f8e9eecca11e49.zip
Add extra fields into struct smbd_smb2_request_read_state to support receivefile.
Initialize min_recv_size with the size that will trigger the receivefile write path. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
-rw-r--r--source3/smbd/smb2_server.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 1c622a8a54..e1671a7473 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -2831,6 +2831,8 @@ struct smbd_smb2_request_read_state {
uint8_t nbt[NBT_HDR_SIZE];
bool done;
} hdr;
+ bool doing_receivefile;
+ size_t min_recv_size;
size_t pktlen;
uint8_t *pktbuf;
};
@@ -2874,6 +2876,7 @@ static struct tevent_req *smbd_smb2_request_read_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
state->smb2_req->sconn = sconn;
+ state->min_recv_size = get_min_receive_file_size(state->smb2_req);
subreq = tstream_readv_pdu_queue_send(state->smb2_req,
state->ev,