From c5072534bc4a49d6870dda86379353d313e655e7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 13 Sep 2011 16:30:30 +0200 Subject: [PATCH] s3:libsmb: make use of cli_state_max_requests() in cli_pull_send() metze --- source3/libsmb/clireadwrite.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index a6f79fb1d23..83fd5bdb0b9 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -396,6 +396,7 @@ struct cli_pull_state { /* * Outstanding requests */ + uint16_t max_reqs; int num_reqs; struct cli_pull_subreq *reqs; @@ -479,8 +480,10 @@ struct tevent_req *cli_pull_send(TALLOC_CTX *mem_ctx, state->chunk_size = cli_read_max_bufsize(cli); + state->max_reqs = cli_state_max_requests(cli); + state->num_reqs = MAX(window_size/state->chunk_size, 1); - state->num_reqs = MIN(state->num_reqs, cli->max_mux); + state->num_reqs = MIN(state->num_reqs, state->max_reqs); state->reqs = talloc_zero_array(state, struct cli_pull_subreq, state->num_reqs); -- 2.11.4.GIT