mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
s4: libcli/smb2: calculate correct credit charge for finds
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
7d1de8bd48
commit
76c68bc20f
@ -35,6 +35,7 @@ struct smb2_request *smb2_find_send(struct smb2_tree *tree, struct smb2_find *io
|
|||||||
|
|
||||||
req = smb2_request_init_tree(tree, SMB2_OP_QUERY_DIRECTORY, 0x20, true, 0);
|
req = smb2_request_init_tree(tree, SMB2_OP_QUERY_DIRECTORY, 0x20, true, 0);
|
||||||
if (req == NULL) return NULL;
|
if (req == NULL) return NULL;
|
||||||
|
req->credit_charge = (MAX(io->in.max_response_size, 1) - 1)/ 65536 + 1;
|
||||||
|
|
||||||
SCVAL(req->out.body, 0x02, io->in.level);
|
SCVAL(req->out.body, 0x02, io->in.level);
|
||||||
SCVAL(req->out.body, 0x03, io->in.continue_flags);
|
SCVAL(req->out.body, 0x03, io->in.continue_flags);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user