summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-04-28 16:11:50 +0200
committerStefan Metzmacher <metze@samba.org>2011-04-28 20:35:59 +0200
commit8116b19a2846261fe5dcc34fd640b7a52556503f (patch)
tree0d96db254773c1984fff3035bc9798f2bf2c1c77 /source4/libcli
parenteb0eb971ca56bba5fe0b7b39d0427913eb366355 (diff)
downloadsamba-8116b19a2846261fe5dcc34fd640b7a52556503f.tar.gz
samba-8116b19a2846261fe5dcc34fd640b7a52556503f.tar.bz2
samba-8116b19a2846261fe5dcc34fd640b7a52556503f.zip
s4:libcli/smb2: move smb2_connect_tcon_done()
It should be after smb2_connect_session_done(). metze
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/smb2/connect.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c
index 22fb8747e9..b3d57ebff2 100644
--- a/source4/libcli/smb2/connect.c
+++ b/source4/libcli/smb2/connect.c
@@ -46,26 +46,6 @@ struct smb2_connect_state {
struct smb2_tree *tree;
};
-static void smb2_connect_tcon_done(struct smb2_request *smb2req)
-{
- struct tevent_req *req =
- talloc_get_type_abort(smb2req->async.private_data,
- struct tevent_req);
- struct smb2_connect_state *state =
- tevent_req_data(req,
- struct smb2_connect_state);
- NTSTATUS status;
-
- status = smb2_tree_connect_recv(smb2req, &state->tcon);
- if (tevent_req_nterror(req, status)) {
- return;
- }
-
- state->tree->tid = state->tcon.out.tid;
-
- tevent_req_done(req);
-}
-
static void smb2_connect_resolve_done(struct composite_context *creq);
/*
@@ -280,6 +260,8 @@ static void smb2_connect_negprot_done(struct smb2_request *smb2req)
creq->async.private_data = req;
}
+static void smb2_connect_tcon_done(struct smb2_request *smb2req);
+
static void smb2_connect_session_done(struct composite_context *creq)
{
struct tevent_req *req =
@@ -316,6 +298,26 @@ static void smb2_connect_session_done(struct composite_context *creq)
smb2req->async.private_data = req;
}
+static void smb2_connect_tcon_done(struct smb2_request *smb2req)
+{
+ struct tevent_req *req =
+ talloc_get_type_abort(smb2req->async.private_data,
+ struct tevent_req);
+ struct smb2_connect_state *state =
+ tevent_req_data(req,
+ struct smb2_connect_state);
+ NTSTATUS status;
+
+ status = smb2_tree_connect_recv(smb2req, &state->tcon);
+ if (tevent_req_nterror(req, status)) {
+ return;
+ }
+
+ state->tree->tid = state->tcon.out.tid;
+
+ tevent_req_done(req);
+}
+
NTSTATUS smb2_connect_recv(struct tevent_req *req,
TALLOC_CTX *mem_ctx,
struct smb2_tree **tree)