1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-29 13:49:30 +03:00

flush on a invalid fsp should give an error

(This used to be commit ef5f4866fb)
This commit is contained in:
Andrew Tridgell
2001-08-24 04:56:33 +00:00
parent 7874b0ac17
commit a22db179a9

View File

@ -2740,24 +2740,24 @@ int reply_lseek(connection_struct *conn, char *inbuf,char *outbuf, int size, int
int reply_flush(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize)
{
int outsize = set_message(outbuf,0,0,True);
files_struct *fsp = file_fsp(inbuf,smb_vwv0);
START_PROFILE(SMBflush);
int outsize = set_message(outbuf,0,0,True);
files_struct *fsp = file_fsp(inbuf,smb_vwv0);
START_PROFILE(SMBflush);
if (fsp) {
CHECK_FSP(fsp,conn);
CHECK_ERROR(fsp);
}
if (!fsp) {
file_sync_all(conn);
} else {
CHECK_FSP(fsp,conn);
if (fsp) {
CHECK_ERROR(fsp);
}
if (!fsp) {
file_sync_all(conn);
} else {
sync_file(conn,fsp);
}
DEBUG(3,("flush\n"));
END_PROFILE(SMBflush);
return(outsize);
}
DEBUG(3,("flush\n"));
END_PROFILE(SMBflush);
return(outsize);
}