1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r8290: Fix for bug in SMBwriteBraw where we incorrectly

returned the number of bytes written. Patch from
Marcel Müller <mueller@maazl.de>.
Jeremy.
This commit is contained in:
Jeremy Allison 2005-07-10 16:37:32 +00:00 committed by Gerald (Jerry) Carter
parent 1ebb3aa0d5
commit 81e7a4a2cf

View File

@ -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);