summaryrefslogtreecommitdiff
path: root/libcli/smb
diff options
context:
space:
mode:
Diffstat (limited to 'libcli/smb')
-rw-r--r--libcli/smb/smb2cli_close.c11
-rw-r--r--libcli/smb/smbXcli_base.h4
2 files changed, 10 insertions, 5 deletions
diff --git a/libcli/smb/smb2cli_close.c b/libcli/smb/smb2cli_close.c
index d4cba41416..42ed65a5de 100644
--- a/libcli/smb/smb2cli_close.c
+++ b/libcli/smb/smb2cli_close.c
@@ -34,7 +34,7 @@ struct tevent_req *smb2cli_close_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,
uint16_t flags,
uint64_t fid_persistent,
uint64_t fid_volatile)
@@ -42,6 +42,7 @@ struct tevent_req *smb2cli_close_send(TALLOC_CTX *mem_ctx,
struct tevent_req *req, *subreq;
struct smb2cli_close_state *state;
uint8_t *fixed;
+ uint32_t tcon_id = 0;
req = tevent_req_create(mem_ctx, &state,
struct smb2cli_close_state);
@@ -54,6 +55,10 @@ struct tevent_req *smb2cli_close_send(TALLOC_CTX *mem_ctx,
SBVAL(fixed, 8, fid_persistent);
SBVAL(fixed, 16, fid_volatile);
+ if (tcon) {
+ tcon_id = smb2cli_tcon_current_id(tcon);
+ }
+
subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_CLOSE,
0, 0, /* flags */
timeout_msec,
@@ -98,7 +103,7 @@ NTSTATUS smb2cli_close_recv(struct tevent_req *req)
NTSTATUS smb2cli_close(struct smbXcli_conn *conn,
uint32_t timeout_msec,
struct smbXcli_session *session,
- uint32_t tcon_id,
+ struct smbXcli_tcon *tcon,
uint16_t flags,
uint64_t fid_persistent,
uint64_t fid_volatile)
@@ -120,7 +125,7 @@ NTSTATUS smb2cli_close(struct smbXcli_conn *conn,
goto fail;
}
req = smb2cli_close_send(frame, ev, conn, timeout_msec,
- session, tcon_id, flags,
+ session, tcon, flags,
fid_persistent, fid_volatile);
if (req == NULL) {
goto fail;
diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h
index e65ff144aa..b433c4e769 100644
--- a/libcli/smb/smbXcli_base.h
+++ b/libcli/smb/smbXcli_base.h
@@ -356,7 +356,7 @@ struct tevent_req *smb2cli_close_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,
uint16_t flags,
uint64_t fid_persistent,
uint64_t fid_volatile);
@@ -364,7 +364,7 @@ NTSTATUS smb2cli_close_recv(struct tevent_req *req);
NTSTATUS smb2cli_close(struct smbXcli_conn *conn,
uint32_t timeout_msec,
struct smbXcli_session *session,
- uint32_t tcon_id,
+ struct smbXcli_tcon *tcon,
uint16_t flags,
uint64_t fid_persistent,
uint64_t fid_volatile);