From: Volker Lendecke Date: Thu, 7 Dec 2017 17:12:28 +0000 (+0100) Subject: smbd: Fix async large read X-Git-Tag: talloc-2.1.11~251 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3190cd15b697c1b14f92fcefc9893e1dc2dbf82a;p=thirdparty%2Fsamba.git smbd: Fix async large read We also do the 128k reads asynchronously, just not the huge 24MB ones. smb_setlen does not work well for >64k. Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider --- diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index d3611baae6a..4fc1132be87 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -305,7 +305,7 @@ static void aio_pread_smb1_done(struct tevent_req *req) (int)aio_ex->nbyte, (int)nread ) ); } - smb_setlen(outbuf, outsize - 4); + _smb_setlen_large(outbuf, outsize - 4); show_msg(outbuf); if (!srv_send_smb(aio_ex->smbreq->xconn, outbuf, true, aio_ex->smbreq->seqnum+1,