summaryrefslogtreecommitdiff
path: root/libcli/smb
diff options
context:
space:
mode:
Diffstat (limited to 'libcli/smb')
-rw-r--r--libcli/smb/smb2cli_read.c11
-rw-r--r--libcli/smb/smbXcli_base.h4
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,