From a5b39d1f74cd1b9271fed6017cb0708320339a14 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 10 Jul 2005 16:37:32 +0000 Subject: r8290: Fix for bug in SMBwriteBraw where we incorrectly returned the number of bytes written. Patch from Marcel Müller . Jeremy. (This used to be commit 81e7a4a2cfd2d4764d757702f17635e5007e59de) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source3/smbd/reply.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index bb583fb94b..5e8c0ef296 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2751,7 +2751,6 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size, /* Set up outbuf to return the correct return */ outsize = set_message(outbuf,1,0,True); SCVAL(outbuf,smb_com,SMBwritec); - SSVAL(outbuf,smb_vwv0,total_written); if (numtowrite != 0) { @@ -2783,6 +2782,8 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size, total_written += nwritten; } + SSVAL(outbuf,smb_vwv0,total_written); + if ((lp_syncalways(SNUM(conn)) || write_through) && lp_strict_sync(SNUM(conn))) sync_file(conn,fsp); -- cgit