diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-04-28 16:09:35 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-04-28 20:35:57 +0200 |
commit | eb0eb971ca56bba5fe0b7b39d0427913eb366355 (patch) | |
tree | 5816748929a32ede7b046c294e5fe8b75c54ffd1 /source4 | |
parent | ad65cf5b6a16d192959c3b059ed791bed5dd190d (diff) | |
download | samba-eb0eb971ca56bba5fe0b7b39d0427913eb366355.tar.gz samba-eb0eb971ca56bba5fe0b7b39d0427913eb366355.tar.bz2 samba-eb0eb971ca56bba5fe0b7b39d0427913eb366355.zip |
s4:libcli/smb2: move smb2_connect_session_done()
It should be after smb2_connect_negprot_done().
metze
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/smb2/connect.c | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c index ed4795b5bd..22fb8747e9 100644 --- a/source4/libcli/smb2/connect.c +++ b/source4/libcli/smb2/connect.c @@ -66,42 +66,6 @@ static void smb2_connect_tcon_done(struct smb2_request *smb2req) tevent_req_done(req); } -static void smb2_connect_session_done(struct composite_context *creq) -{ - struct tevent_req *req = - talloc_get_type_abort(creq->async.private_data, - struct tevent_req); - struct smb2_connect_state *state = - tevent_req_data(req, - struct smb2_connect_state); - struct smb2_request *smb2req; - NTSTATUS status; - - status = smb2_session_setup_spnego_recv(creq); - if (tevent_req_nterror(req, status)) { - return; - } - - state->tree = smb2_tree_init(state->session, state, true); - if (tevent_req_nomem(state->tree, req)) { - return; - } - - state->tcon.in.reserved = 0; - state->tcon.in.path = talloc_asprintf(state, "\\\\%s\\%s", - state->host, state->share); - if (tevent_req_nomem(state->tcon.in.path, req)) { - return; - } - - smb2req = smb2_tree_connect_send(state->tree, &state->tcon); - if (tevent_req_nomem(smb2req, req)) { - return; - } - smb2req->async.fn = smb2_connect_tcon_done; - smb2req->async.private_data = req; -} - static void smb2_connect_resolve_done(struct composite_context *creq); /* @@ -245,6 +209,8 @@ static void smb2_connect_socket_done(struct composite_context *creq) smb2req->async.private_data = req; } +static void smb2_connect_session_done(struct composite_context *creq); + static void smb2_connect_negprot_done(struct smb2_request *smb2req) { struct tevent_req *req = @@ -314,6 +280,42 @@ static void smb2_connect_negprot_done(struct smb2_request *smb2req) creq->async.private_data = req; } +static void smb2_connect_session_done(struct composite_context *creq) +{ + struct tevent_req *req = + talloc_get_type_abort(creq->async.private_data, + struct tevent_req); + struct smb2_connect_state *state = + tevent_req_data(req, + struct smb2_connect_state); + struct smb2_request *smb2req; + NTSTATUS status; + + status = smb2_session_setup_spnego_recv(creq); + if (tevent_req_nterror(req, status)) { + return; + } + + state->tree = smb2_tree_init(state->session, state, true); + if (tevent_req_nomem(state->tree, req)) { + return; + } + + state->tcon.in.reserved = 0; + state->tcon.in.path = talloc_asprintf(state, "\\\\%s\\%s", + state->host, state->share); + if (tevent_req_nomem(state->tcon.in.path, req)) { + return; + } + + smb2req = smb2_tree_connect_send(state->tree, &state->tcon); + if (tevent_req_nomem(smb2req, req)) { + return; + } + smb2req->async.fn = smb2_connect_tcon_done; + smb2req->async.private_data = req; +} + NTSTATUS smb2_connect_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct smb2_tree **tree) |