summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-05-19 15:10:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:09 -0500
commit7f0e17e9030ad734977f66c2cc27faec501154a2 (patch)
treedc44952b04d4e61fb8fcff50b4a3cb720276b57d /source4/smb_server/smb
parent472c0886254b82c2feffea734a80c4d29bd773b6 (diff)
downloadsamba-7f0e17e9030ad734977f66c2cc27faec501154a2.tar.gz
samba-7f0e17e9030ad734977f66c2cc27faec501154a2.tar.bz2
samba-7f0e17e9030ad734977f66c2cc27faec501154a2.zip
r15718: - split the SMBflush with the 0xFFFF wildcard fnum into a different level
metze (This used to be commit 95bf41b4d4ec96349802955e364fe44ef85f9077)
Diffstat (limited to 'source4/smb_server/smb')
-rw-r--r--source4/smb_server/smb/reply.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/smb_server/smb/reply.c b/source4/smb_server/smb/reply.c
index cfd004304a..768fba1319 100644
--- a/source4/smb_server/smb/reply.c
+++ b/source4/smb_server/smb/reply.c
@@ -1069,13 +1069,21 @@ void smbsrv_reply_lseek(struct smbsrv_request *req)
void smbsrv_reply_flush(struct smbsrv_request *req)
{
union smb_flush *io;
+ uint16_t fnum;
/* parse request */
SMBSRV_CHECK_WCT(req, 1);
SMBSRV_TALLOC_IO_PTR(io, union smb_flush);
SMBSRV_SETUP_NTVFS_REQUEST(reply_simple_send, NTVFS_ASYNC_STATE_MAY_ASYNC);
- io->flush.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ fnum = req_fnum(req, req->in.vwv, VWV(0));
+
+ if (fnum == 0xFFFF) {
+ io->flush_all.level = RAW_FLUSH_ALL;
+ } else {
+ io->flush.level = RAW_FLUSH_FLUSH;
+ io->flush.in.file.fnum = fnum;
+ }
SMBSRV_CALL_NTVFS_BACKEND(ntvfs_flush(req->ntvfs, io));
}