diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-03-04 14:07:26 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-03-05 10:06:24 -0800 |
commit | b86f90611820bcf7826bd1de3c7b05488a8f1b0e (patch) | |
tree | 0b271b5e05f867a2300bf313deda2f9f3b5a3a07 /source3/smbd/reply.c | |
parent | 3dac00b568613f5a1322883237e40b98ddd1d71d (diff) | |
download | samba-b86f90611820bcf7826bd1de3c7b05488a8f1b0e.tar.gz samba-b86f90611820bcf7826bd1de3c7b05488a8f1b0e.tar.xz samba-b86f90611820bcf7826bd1de3c7b05488a8f1b0e.zip |
s3:smbd: pass the final numtoread reply_outbuf() for the lockread reply.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 112c9e6b49..eacb0fb031 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3492,10 +3492,6 @@ void reply_lockread(struct smb_request *req) numtoread = MIN(BUFFER_SIZE - (smb_size + 5*2 + 3), numtoread); - reply_outbuf(req, 5, numtoread + 3); - - data = smb_buf(req->outbuf) + 3; - /* * NB. Discovered by Menny Hamburger at Mainsoft. This is a core+ * protocol request that predates the read/write lock concept. @@ -3534,6 +3530,11 @@ Returning short read of maximum allowed for compatibility with Windows 2000.\n", (unsigned int)sconn->smb1.negprot.max_recv)); numtoread = MIN(numtoread, sconn->smb1.negprot.max_recv); } + + reply_outbuf(req, 5, numtoread + 3); + + data = smb_buf(req->outbuf) + 3; + nread = read_file(fsp,data,startpos,numtoread); if (nread < 0) { |