summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-13 16:30:30 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-13 18:12:23 +0200
commitc5072534bc4a49d6870dda86379353d313e655e7 (patch)
tree3717a96bd442c92b97dcf03d54947201e20b1340 /source3
parentdafeef47b4a325b877a22ed9939697399577b155 (diff)
downloadsamba-c5072534bc4a49d6870dda86379353d313e655e7.tar.gz
samba-c5072534bc4a49d6870dda86379353d313e655e7.tar.bz2
samba-c5072534bc4a49d6870dda86379353d313e655e7.zip
s3:libsmb: make use of cli_state_max_requests() in cli_pull_send()
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clireadwrite.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index a6f79fb1d2..83fd5bdb0b 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);