summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-08-15 14:17:25 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-15 14:45:04 +0200
commit7ffee47bc6cc2039a32a527e19e4a76c257fc6b0 (patch)
tree4c00775d0aae401ce9d6803a180bc1a4c0780ee0 /libcli
parent24b11430680ebd20303168ec73142226543ad6de (diff)
downloadsamba-7ffee47bc6cc2039a32a527e19e4a76c257fc6b0.tar.gz
samba-7ffee47bc6cc2039a32a527e19e4a76c257fc6b0.tar.bz2
samba-7ffee47bc6cc2039a32a527e19e4a76c257fc6b0.zip
libcli/smb: all flags except SMB2_HDR_FLAG_ASYNC should be cleared in a cancel request.
metze
Diffstat (limited to 'libcli')
-rw-r--r--libcli/smb/smbXcli_base.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index dad869c2c0..d9b17f83bb 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -2422,6 +2422,12 @@ static bool smb2cli_req_cancel(struct tevent_req *req)
}
substate = tevent_req_data(subreq, struct smbXcli_req_state);
+ /*
+ * clear everything but the SMB2_HDR_FLAG_ASYNC flag
+ * e.g. if SMB2_HDR_FLAG_CHAINED is set we get INVALID_PARAMETER back
+ */
+ flags &= SMB2_HDR_FLAG_ASYNC;
+
if (flags & SMB2_HDR_FLAG_ASYNC) {
mid = 0;
}