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 | 74f9b52e659265c7a6283550d226f0cec5e8fb18 (patch) | |
tree | dc7b6cfec11071dbb9a18200ee25d4b6f58873c9 /libcli | |
parent | 32b33999dbc5c73f5efd04e3ae0ab5a0b13c7cc2 (diff) | |
download | samba-74f9b52e659265c7a6283550d226f0cec5e8fb18.tar.gz samba-74f9b52e659265c7a6283550d226f0cec5e8fb18.tar.bz2 samba-74f9b52e659265c7a6283550d226f0cec5e8fb18.zip |
libcli/smb: pass smbXcli_tcon to smb2cli_close*()
metze
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/smb/smb2cli_close.c | 11 | ||||
-rw-r--r-- | libcli/smb/smbXcli_base.h | 4 |
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); |