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:
parent
1ebb3aa0d5
commit
81e7a4a2cf
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user