From bf1a4b2bc411cba18980d00bf630aa61fc4e4699 Mon Sep 17 00:00:00 2001 From: Steven Danneman Date: Wed, 22 Sep 2010 13:23:49 -0700 Subject: s4:libcli:smb2 Rename pending_id to async_id and make 64-bit Match MS-SMB2 - 2.2.1.1 SMB2 Packet Header - ASYNC --- source4/libcli/smb2/cancel.c | 2 +- source4/libcli/smb2/smb2.h | 6 +++--- source4/libcli/smb2/transport.c | 2 +- source4/torture/smb2/util.c | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'source4') diff --git a/source4/libcli/smb2/cancel.c b/source4/libcli/smb2/cancel.c index 65f02187c1..28ef3099f3 100644 --- a/source4/libcli/smb2/cancel.c +++ b/source4/libcli/smb2/cancel.c @@ -53,7 +53,7 @@ NTSTATUS smb2_cancel(struct smb2_request *r) SIVAL(c->out.hdr, SMB2_HDR_FLAGS, 0x00000002); SSVAL(c->out.hdr, SMB2_HDR_CREDIT, 0x0030); - SIVAL(c->out.hdr, SMB2_HDR_PID, r->cancel.pending_id); + SBVAL(c->out.hdr, SMB2_HDR_ASYNC_ID, r->cancel.async_id); SBVAL(c->out.hdr, SMB2_HDR_MESSAGE_ID, c->seqnum); if (r->session) { SBVAL(c->out.hdr, SMB2_HDR_SESSION_ID, r->session->uid); diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h index 26b9bcb2a1..aaafedd28f 100644 --- a/source4/libcli/smb2/smb2.h +++ b/source4/libcli/smb2/smb2.h @@ -167,7 +167,7 @@ struct smb2_request { /* each request is in one of 3 possible states */ enum smb2_request_state state; - + struct smb2_transport *transport; struct smb2_session *session; struct smb2_tree *tree; @@ -177,13 +177,13 @@ struct smb2_request { struct { bool do_cancel; bool can_cancel; - uint32_t pending_id; + uint64_t async_id; } cancel; /* the NT status for this request. Set by packet receive code or code detecting error. */ NTSTATUS status; - + struct smb2_request_buffer in; struct smb2_request_buffer out; diff --git a/source4/libcli/smb2/transport.c b/source4/libcli/smb2/transport.c index dffd1acd2b..04b2d38327 100644 --- a/source4/libcli/smb2/transport.c +++ b/source4/libcli/smb2/transport.c @@ -302,7 +302,7 @@ static NTSTATUS smb2_transport_finish_recv(void *private_data, DATA_BLOB blob) 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); + req->cancel.async_id = BVAL(hdr, SMB2_HDR_ASYNC_ID); for (i=0; i< req->cancel.do_cancel; i++) { smb2_cancel(req); } diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c index 96981125c2..8feb96857d 100644 --- a/source4/torture/smb2/util.c +++ b/source4/torture/smb2/util.c @@ -322,6 +322,7 @@ NTSTATUS torture_smb2_testfile(struct smb2_tree *tree, const char *fname, r.in.length = 5; r.in.offset = 0; + // What is the purpose of this? Server returns EOF. smb2_read(tree, tree, &r); return NT_STATUS_OK; -- cgit