diff options
-rw-r--r-- | source3/libsmb/smb2cli_tcon.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libsmb/smb2cli_tcon.c b/source3/libsmb/smb2cli_tcon.c index 4e92333499..731a6102cb 100644 --- a/source3/libsmb/smb2cli_tcon.c +++ b/source3/libsmb/smb2cli_tcon.c @@ -170,6 +170,7 @@ NTSTATUS smb2cli_tcon(struct cli_state *cli, const char *share) } struct smb2cli_tdis_state { + struct cli_state *cli; uint8_t fixed[4]; }; @@ -187,6 +188,7 @@ struct tevent_req *smb2cli_tdis_send(TALLOC_CTX *mem_ctx, if (req == NULL) { return NULL; } + state->cli = cli; SSVAL(state->fixed, 0, 4); subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_TDIS, @@ -209,6 +211,9 @@ static void smb2cli_tdis_done(struct tevent_req *subreq) struct tevent_req *req = tevent_req_callback_data(subreq, struct tevent_req); + struct smb2cli_tdis_state *state = + tevent_req_data(req, + struct smb2cli_tdis_state); NTSTATUS status; struct iovec *iov; static const struct smb2cli_req_expected_response expected[] = { @@ -224,6 +229,7 @@ static void smb2cli_tdis_done(struct tevent_req *subreq) if (tevent_req_nterror(req, status)) { return; } + state->cli->smb2.tid = 0; tevent_req_done(req); } |