diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-08-13 09:54:42 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-08-15 09:07:06 +0200 |
commit | 4a3352020db962ef40728d8a754da8a9418ca8a7 (patch) | |
tree | 54f5ccc5ca303b813f8446cf60f4e81ede19fb7d /libcli/smb | |
parent | 318735fd5e15c5fd7010c0f657c86d27b45279ac (diff) | |
download | samba-4a3352020db962ef40728d8a754da8a9418ca8a7.tar.gz samba-4a3352020db962ef40728d8a754da8a9418ca8a7.tar.bz2 samba-4a3352020db962ef40728d8a754da8a9418ca8a7.zip |
libcli/smb: pass max_dyn_len to smb2cli_req_create()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'libcli/smb')
-rw-r--r-- | libcli/smb/smbXcli_base.c | 11 | ||||
-rw-r--r-- | libcli/smb/smbXcli_base.h | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 7d7df144f7..0271691455 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -2495,7 +2495,7 @@ static bool smb2cli_req_cancel(struct tevent_req *req) 0, /* timeout */ tcon, session, fixed, fixed_len, - NULL, 0); + NULL, 0, 0); if (subreq == NULL) { return false; } @@ -2544,7 +2544,8 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx, const uint8_t *fixed, uint16_t fixed_len, const uint8_t *dyn, - uint32_t dyn_len) + uint32_t dyn_len, + uint32_t max_dyn_len) { struct tevent_req *req; struct smbXcli_req_state *state; @@ -2617,6 +2618,7 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx, state->smb2.fixed_len = fixed_len; state->smb2.dyn = dyn; state->smb2.dyn_len = dyn_len; + state->smb2.max_dyn_len = max_dyn_len; if (state->smb2.should_encrypt) { SIVAL(state->smb2.transform, SMB2_TF_PROTOCOL_ID, SMB2_TF_MAGIC); @@ -2986,12 +2988,15 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx, { struct tevent_req *req; NTSTATUS status; + uint32_t max_dyn_len = 0; req = smb2cli_req_create(mem_ctx, ev, conn, cmd, additional_flags, clear_flags, timeout_msec, tcon, session, - fixed, fixed_len, dyn, dyn_len); + fixed, fixed_len, + dyn, dyn_len, + max_dyn_len); if (req == NULL) { return NULL; } diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h index a497e1376f..017c0f059d 100644 --- a/libcli/smb/smbXcli_base.h +++ b/libcli/smb/smbXcli_base.h @@ -218,7 +218,8 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx, const uint8_t *fixed, uint16_t fixed_len, const uint8_t *dyn, - uint32_t dyn_len); + uint32_t dyn_len, + uint32_t max_dyn_len); void smb2cli_req_set_notify_async(struct tevent_req *req); NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs, int num_reqs); |