From c94b2898cd5d1174181add198a462ab232f5aba6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 1 Nov 2007 21:51:45 -0700 Subject: Ensure we detect a large writeX when using recvfile. More changes needed to make the UNIX_LARGE_WRITEX_CAP writes work (I'll add these tomorrow). Jeremy. (This used to be commit 1c71546b6152d2930b98f766311bbd161ee0ee4e) --- source3/smbd/reply.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index d2aa6c6929..d4f3f1f255 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3926,7 +3926,8 @@ void reply_write_and_X(connection_struct *conn, struct smb_request *req) numtowrite = SVAL(req->inbuf,smb_vwv10); smb_doff = SVAL(req->inbuf,smb_vwv11); smblen = smb_len(req->inbuf); - large_writeX = ((req->wct == 14) && (smblen > 0xFFFF)); + large_writeX = (req->wct == 14 && + (smblen > 0xFFFF || req->unread_bytes > 0xFFFF)); /* Deal with possible LARGE_WRITEX */ if (large_writeX) { -- cgit