diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-17 21:17:18 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-18 05:33:10 +0200 |
commit | 46f64aafcbb66adfe42d7f4b26709878acfd3648 (patch) | |
tree | 5b41ead9d1f4fe8f32a588adc1a27c436be13f9f | |
parent | eb46c7bff380b77b9f59c32a4918ad5b6c326dce (diff) | |
download | samba-46f64aafcbb66adfe42d7f4b26709878acfd3648.tar.gz samba-46f64aafcbb66adfe42d7f4b26709878acfd3648.tar.bz2 samba-46f64aafcbb66adfe42d7f4b26709878acfd3648.zip |
s3:smb2cli: ignore async interim responses and store the async_id
metze
-rw-r--r-- | source3/libsmb/smb2cli_base.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/libsmb/smb2cli_base.c b/source3/libsmb/smb2cli_base.c index 612ae4aad8..869c223b82 100644 --- a/source3/libsmb/smb2cli_base.c +++ b/source3/libsmb/smb2cli_base.c @@ -584,6 +584,18 @@ static void smb2cli_inbuf_received(struct tevent_req *subreq) return; } + status = NT_STATUS(IVAL(inhdr, SMB2_HDR_STATUS)); + if ((flags & SMB2_HDR_FLAG_ASYNC) && + NT_STATUS_EQUAL(status, STATUS_PENDING)) { + uint32_t req_flags = IVAL(state->hdr, SMB2_HDR_FLAGS); + uint64_t async_id = BVAL(inhdr, SMB2_HDR_ASYNC_ID); + + req_flags |= SMB2_HDR_FLAG_ASYNC; + SBVAL(state->hdr, SMB2_HDR_FLAGS, req_flags); + SBVAL(state->hdr, SMB2_HDR_ASYNC_ID, async_id); + continue; + } + smb2cli_req_unset_pending(req); /* |