summaryrefslogtreecommitdiff
path: root/source4/libcli/composite/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/composite/connect.c')
-rw-r--r--source4/libcli/composite/connect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/composite/connect.c b/source4/libcli/composite/connect.c
index adac9bcf67..4d35f5c73a 100644
--- a/source4/libcli/composite/connect.c
+++ b/source4/libcli/composite/connect.c
@@ -136,6 +136,9 @@ static NTSTATUS connect_session_setup(struct composite_context *c,
state->req = smb_raw_tcon_send(io->out.tree, state->io_tcon);
NT_STATUS_HAVE_NO_MEMORY(state->req);
+ if (state->req->state == SMBCLI_REQUEST_ERROR) {
+ return state->req->status;
+ }
state->req->async.fn = request_handler;
state->req->async.private = c;
@@ -171,6 +174,9 @@ static NTSTATUS connect_negprot(struct composite_context *c,
state->creq = smb_composite_sesssetup_send(state->session, state->io_setup);
NT_STATUS_HAVE_NO_MEMORY(state->creq);
+ if (state->creq->state == SMBCLI_REQUEST_ERROR) {
+ return state->creq->status;
+ }
state->creq->async.fn = composite_handler;
state->creq->async.private = c;