summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-08-24 04:56:33 +0000
committerAndrew Tridgell <tridge@samba.org>2001-08-24 04:56:33 +0000
commita22db179a9439ab8455c3cbc13040c2d4a1f1882 (patch)
tree07927d8f76a4413110b5a52da95d83594d668ff5 /source3
parent7874b0ac171449148a370f8c9da771efb591d0be (diff)
downloadsamba-a22db179a9439ab8455c3cbc13040c2d4a1f1882.tar.gz
samba-a22db179a9439ab8455c3cbc13040c2d4a1f1882.tar.bz2
samba-a22db179a9439ab8455c3cbc13040c2d4a1f1882.zip
flush on a invalid fsp should give an error
(This used to be commit ef5f4866fbbfa6be07cdc3e612a8899967d48289)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/reply.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index fd4f5d62c0..fca16a2f04 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -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);
-
- if (fsp) {
- CHECK_FSP(fsp,conn);
- CHECK_ERROR(fsp);
- }
+ int outsize = set_message(outbuf,0,0,True);
+ files_struct *fsp = file_fsp(inbuf,smb_vwv0);
+ START_PROFILE(SMBflush);
- 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);
}