summaryrefslogtreecommitdiff
path: root/source3/libsmb/cliconnect.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-19 16:25:52 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-20 15:56:27 +0200
commit8f41e54d538896a929ef8ebf224ddcfea7982ba8 (patch)
tree2df4093c3c5fac9a11291ad01e21c71ab53c3f32 /source3/libsmb/cliconnect.c
parent1e3822115c3b466632044fe64c908b6f2de5803a (diff)
downloadsamba-8f41e54d538896a929ef8ebf224ddcfea7982ba8.tar.gz
samba-8f41e54d538896a929ef8ebf224ddcfea7982ba8.tar.bz2
samba-8f41e54d538896a929ef8ebf224ddcfea7982ba8.zip
s3:libsmb: move cli->cnum to cli->smb1.tid and hide it behind cli_state_[g|s]et_tid()
metze
Diffstat (limited to 'source3/libsmb/cliconnect.c')
-rw-r--r--source3/libsmb/cliconnect.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 03251f965b..4e3e47f512 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2405,7 +2405,7 @@ static void cli_tcon_andx_done(struct tevent_req *subreq)
cli->dfsroot = ((SVAL(vwv+2, 0) & SMB_SHARE_IN_DFS) != 0);
}
- cli->cnum = SVAL(inbuf,smb_tid);
+ cli->smb1.tid = SVAL(inbuf,smb_tid);
tevent_req_done(req);
}
@@ -2498,7 +2498,7 @@ static void cli_tdis_done(struct tevent_req *subreq)
tevent_req_nterror(req, status);
return;
}
- state->cli->cnum = -1;
+ state->cli->smb1.tid = UINT16_MAX;
tevent_req_done(req);
}
@@ -2551,7 +2551,6 @@ struct tevent_req *cli_negprot_send(TALLOC_CTX *mem_ctx,
struct cli_negprot_state *state;
uint8_t *bytes = NULL;
int numprots;
- uint16_t cnum;
req = tevent_req_create(mem_ctx, &state, struct cli_negprot_state);
if (req == NULL) {
@@ -2582,12 +2581,8 @@ struct tevent_req *cli_negprot_send(TALLOC_CTX *mem_ctx,
}
}
- cnum = cli->cnum;
-
- cli->cnum = 0;
subreq = cli_smb_send(state, ev, cli, SMBnegprot, 0, 0, NULL,
talloc_get_size(bytes), bytes);
- cli->cnum = cnum;
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);