diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-13 11:37:20 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-13 13:16:08 +0200 |
commit | a15fd8376770a1e2191e561c93a93887f94fe347 (patch) | |
tree | 2e5c68417cd762bf328a746057209c2f8f58fe5b /source3 | |
parent | 76c1164406fa642fccdda0e4643a2ff4afdaedb4 (diff) | |
download | samba-a15fd8376770a1e2191e561c93a93887f94fe347.tar.gz samba-a15fd8376770a1e2191e561c93a93887f94fe347.tar.bz2 samba-a15fd8376770a1e2191e561c93a93887f94fe347.zip |
s3:libsmb: make use of cli_state_available_size() in cli_list_old_send()
metze
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clilist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index ac10795920..521afc9aba 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -298,6 +298,7 @@ static struct tevent_req *cli_list_old_send(TALLOC_CTX *mem_ctx, struct cli_list_old_state *state; uint8_t *bytes; static const uint16_t zero = 0; + uint32_t usable_space; req = tevent_req_create(mem_ctx, &state, struct cli_list_old_state); if (req == NULL) { @@ -311,7 +312,8 @@ static struct tevent_req *cli_list_old_send(TALLOC_CTX *mem_ctx, if (tevent_req_nomem(state->mask, req)) { return tevent_req_post(req, ev); } - state->num_asked = (cli->max_xmit - 100) / DIR_STRUCT_SIZE; + usable_space = cli_state_available_size(cli, 100); + state->num_asked = usable_space / DIR_STRUCT_SIZE; SSVAL(state->vwv + 0, 0, state->num_asked); SSVAL(state->vwv + 1, 0, state->attribute); |