diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c index 6fc3993a4e8..95ff05eac8f 100644 --- a/source4/libcli/smb2/connect.c +++ b/source4/libcli/smb2/connect.c @@ -237,6 +237,7 @@ static void smb2_connect_session_start(struct tevent_req *req) tevent_req_set_callback(subreq, smb2_connect_session_done, req); } +static void smb2_connect_tcon_start(struct tevent_req *req); static void smb2_connect_tcon_done(struct tevent_req *subreq); static void smb2_connect_session_done(struct tevent_req *subreq) @@ -248,7 +249,6 @@ static void smb2_connect_session_done(struct tevent_req *subreq) tevent_req_data(req, struct smb2_connect_state); NTSTATUS status; - uint32_t timeout_msec; status = smb2_session_setup_spnego_recv(subreq); TALLOC_FREE(subreq); @@ -289,6 +289,17 @@ static void smb2_connect_session_done(struct tevent_req *subreq) return; } + smb2_connect_tcon_start(req); +} + +static void smb2_connect_tcon_start(struct tevent_req *req) +{ + struct smb2_connect_state *state = + tevent_req_data(req, + struct smb2_connect_state); + struct tevent_req *subreq = NULL; + uint32_t timeout_msec; + timeout_msec = state->transport->options.request_timeout * 1000; subreq = smb2cli_tcon_send(state, state->ev,