diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-07-23 22:32:49 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-07-24 22:20:06 +0200 |
commit | 697b82a61979b48de86d74d2bf5c498032ff49b1 (patch) | |
tree | 15b979f43065e3ce53f82c3ea57fa080a0a3fb19 /libcli/smb | |
parent | 74f9b52e659265c7a6283550d226f0cec5e8fb18 (diff) | |
download | samba-697b82a61979b48de86d74d2bf5c498032ff49b1.tar.gz samba-697b82a61979b48de86d74d2bf5c498032ff49b1.tar.bz2 samba-697b82a61979b48de86d74d2bf5c498032ff49b1.zip |
libcli/smb: pass smbXcli_tcon to smb2cli_read*()
metze
Diffstat (limited to 'libcli/smb')
-rw-r--r-- | libcli/smb/smb2cli_read.c | 11 | ||||
-rw-r--r-- | libcli/smb/smbXcli_base.h | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/libcli/smb/smb2cli_read.c b/libcli/smb/smb2cli_read.c index 29b9f378e6..5ff4b6443d 100644 --- a/libcli/smb/smb2cli_read.c +++ b/libcli/smb/smb2cli_read.c @@ -38,7 +38,7 @@ struct tevent_req *smb2cli_read_send(TALLOC_CTX *mem_ctx, struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, - uint32_t tcon_id, + struct smbXcli_tcon *tcon, uint32_t length, uint64_t offset, uint64_t fid_persistent, @@ -49,6 +49,7 @@ struct tevent_req *smb2cli_read_send(TALLOC_CTX *mem_ctx, struct tevent_req *req, *subreq; struct smb2cli_read_state *state; uint8_t *fixed; + uint32_t tcon_id = 0; req = tevent_req_create(mem_ctx, &state, struct smb2cli_read_state); @@ -66,6 +67,10 @@ struct tevent_req *smb2cli_read_send(TALLOC_CTX *mem_ctx, SBVAL(fixed, 32, minimum_count); SBVAL(fixed, 40, remaining_bytes); + if (tcon) { + tcon_id = smb2cli_tcon_current_id(tcon); + } + subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_READ, 0, 0, /* flags */ timeout_msec, @@ -142,7 +147,7 @@ NTSTATUS smb2cli_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, NTSTATUS smb2cli_read(struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, - uint32_t tcon_id, + struct smbXcli_tcon *tcon, uint32_t length, uint64_t offset, uint64_t fid_persistent, @@ -170,7 +175,7 @@ NTSTATUS smb2cli_read(struct smbXcli_conn *conn, goto fail; } req = smb2cli_read_send(frame, ev, - conn, timeout_msec, session, tcon_id, + conn, timeout_msec, session, tcon, length, offset, fid_persistent, fid_volatile, minimum_count, remaining_bytes); diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h index b433c4e769..7aefffc85d 100644 --- a/libcli/smb/smbXcli_base.h +++ b/libcli/smb/smbXcli_base.h @@ -374,7 +374,7 @@ struct tevent_req *smb2cli_read_send(TALLOC_CTX *mem_ctx, struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, - uint32_t tcon_id, + struct smbXcli_tcon *tcon, uint32_t length, uint64_t offset, uint64_t fid_persistent, @@ -386,7 +386,7 @@ NTSTATUS smb2cli_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, NTSTATUS smb2cli_read(struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, - uint32_t tcon_id, + struct smbXcli_tcon *tcon, uint32_t length, uint64_t offset, uint64_t fid_persistent, |