summaryrefslogtreecommitdiff
path: root/source3/libsmb/cliconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/cliconnect.c')
-rw-r--r--source3/libsmb/cliconnect.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 14cdf968b8..f963edf678 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -3130,6 +3130,8 @@ static void cli_start_connection_done(struct tevent_req *subreq)
{
struct tevent_req *req = tevent_req_callback_data(
subreq, struct tevent_req);
+ struct cli_start_connection_state *state = tevent_req_data(
+ req, struct cli_start_connection_state);
NTSTATUS status;
status = smbXcli_negprot_recv(subreq);
@@ -3137,6 +3139,13 @@ static void cli_start_connection_done(struct tevent_req *subreq)
if (tevent_req_nterror(req, status)) {
return;
}
+
+ if (smbXcli_conn_protocol(state->cli->conn) >= PROTOCOL_SMB2_02) {
+ /* Ensure we ask for some initial credits. */
+ smb2cli_conn_set_max_credits(state->cli->conn,
+ DEFAULT_SMB2_MAX_CREDITS);
+ }
+
tevent_req_done(req);
}
@@ -3151,6 +3160,7 @@ static NTSTATUS cli_start_connection_recv(struct tevent_req *req,
return status;
}
*output_cli = state->cli;
+
return NT_STATUS_OK;
}