summaryrefslogtreecommitdiffstats
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-07-25 09:01:02 +0200
committerStefan Metzmacher <metze@samba.org>2012-07-25 12:15:03 +0200
commitd2ba9c36f30e175f0715de10e72a34b6e0797718 (patch)
tree7dd65376d23bad414e1d1326f511b1ccace0aa59 /source3/libsmb
parent18bd029ffb7fae85f245d91081efda5603649d2f (diff)
downloadsamba-d2ba9c36f30e175f0715de10e72a34b6e0797718.tar.gz
samba-d2ba9c36f30e175f0715de10e72a34b6e0797718.tar.xz
samba-d2ba9c36f30e175f0715de10e72a34b6e0797718.zip
s3:libsmb: remove cli_state->smb2.tid
metze
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/smb2cli_tcon.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/libsmb/smb2cli_tcon.c b/source3/libsmb/smb2cli_tcon.c
index 615dcfa2d9..ed5b00b329 100644
--- a/source3/libsmb/smb2cli_tcon.c
+++ b/source3/libsmb/smb2cli_tcon.c
@@ -106,6 +106,7 @@ static void smb2cli_tcon_done(struct tevent_req *subreq)
NTSTATUS status;
struct iovec *iov;
uint8_t *body;
+ uint32_t tcon_id;
static const struct smb2cli_req_expected_response expected[] = {
{
.status = NT_STATUS_OK,
@@ -121,7 +122,7 @@ static void smb2cli_tcon_done(struct tevent_req *subreq)
return;
}
- cli->smb2.tid = IVAL(iov[0].iov_base, SMB2_HDR_TID);
+ tcon_id = IVAL(iov[0].iov_base, SMB2_HDR_TID);
body = (uint8_t *)iov[1].iov_base;
cli->smb2.share_type = CVAL(body, 2);
@@ -137,7 +138,7 @@ static void smb2cli_tcon_done(struct tevent_req *subreq)
}
smb2cli_tcon_set_values(cli->smb2.tcon,
- cli->smb2.tid,
+ tcon_id,
cli->smb2.share_type,
cli->smb2.share_flags,
cli->smb2.share_capabilities,
@@ -195,6 +196,7 @@ struct tevent_req *smb2cli_tdis_send(TALLOC_CTX *mem_ctx,
{
struct tevent_req *req, *subreq;
struct smb2cli_tdis_state *state;
+ uint32_t tcon_id = 0;
req = tevent_req_create(mem_ctx, &state,
struct smb2cli_tdis_state);
@@ -204,11 +206,15 @@ struct tevent_req *smb2cli_tdis_send(TALLOC_CTX *mem_ctx,
state->cli = cli;
SSVAL(state->fixed, 0, 4);
+ if (cli->smb2.tcon) {
+ tcon_id = smb2cli_tcon_current_id(cli->smb2.tcon);
+ }
+
subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_TDIS,
0, 0, /* flags */
cli->timeout,
cli->smb2.pid,
- cli->smb2.tid,
+ tcon_id,
cli->smb2.session,
state->fixed, sizeof(state->fixed),
NULL, 0);
@@ -241,7 +247,6 @@ static void smb2cli_tdis_done(struct tevent_req *subreq)
if (tevent_req_nterror(req, status)) {
return;
}
- state->cli->smb2.tid = 0;
TALLOC_FREE(state->cli->smb2.tcon);
tevent_req_done(req);
}