diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-08-15 20:41:50 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-08-15 20:41:50 +1000 |
commit | 4bdb752cc51c9f41859f1a43bf5721ae616fa230 (patch) | |
tree | d54fcf154bb893c2a4f8679a7300f99778d96fc8 /source4/libcli/smb2/transport.c | |
parent | 16112762e70879b50f1dfc49452d6d278bd256cf (diff) | |
parent | c1c6c1b609ab57186dab7b13c56bfe4475a733f7 (diff) | |
download | samba-4bdb752cc51c9f41859f1a43bf5721ae616fa230.tar.gz samba-4bdb752cc51c9f41859f1a43bf5721ae616fa230.tar.bz2 samba-4bdb752cc51c9f41859f1a43bf5721ae616fa230.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit b4b14b748e6babc93faee23fe8f5c03ec2d25cbb)
Diffstat (limited to 'source4/libcli/smb2/transport.c')
-rw-r--r-- | source4/libcli/smb2/transport.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/source4/libcli/smb2/transport.c b/source4/libcli/smb2/transport.c index d9691bec7c..b946a102c8 100644 --- a/source4/libcli/smb2/transport.c +++ b/source4/libcli/smb2/transport.c @@ -235,6 +235,17 @@ static NTSTATUS smb2_transport_finish_recv(void *private, DATA_BLOB blob) req->in.body_size = req->in.size - (SMB2_HDR_BODY+NBT_HDR_SIZE); req->status = NT_STATUS(IVAL(hdr, SMB2_HDR_STATUS)); + if ((flags & SMB2_HDR_FLAG_ASYNC) && + NT_STATUS_EQUAL(req->status, STATUS_PENDING)) { + req->cancel.can_cancel = true; + req->cancel.pending_id = IVAL(hdr, SMB2_HDR_PID); + for (i=0; i< req->cancel.do_cancel; i++) { + smb2_cancel(req); + } + talloc_free(buffer); + return NT_STATUS_OK; + } + if (req->session && req->session->signing_active) { status = smb2_check_signature(&req->in, req->session->session_key); @@ -244,19 +255,6 @@ static NTSTATUS smb2_transport_finish_recv(void *private, DATA_BLOB blob) return status; } } - - - if (NT_STATUS_EQUAL(req->status, STATUS_PENDING)) { - if (flags & 0x00000002) { - req->cancel.can_cancel = true; - req->cancel.pending_id = IVAL(hdr, SMB2_HDR_PID); - for (i=0; i< req->cancel.do_cancel; i++) { - smb2_cancel(req); - } - } - talloc_free(buffer); - return NT_STATUS_OK; - } buffer_code = SVAL(req->in.body, 0); req->in.body_fixed = (buffer_code & ~1); |