1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

s3:libsmb: make use of cli_state_available_size() in cli_list_old_send()

metze
This commit is contained in:
Stefan Metzmacher
2011-09-13 11:37:20 +02:00
parent 76c1164406
commit a15fd83767

View File

@ -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);