summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-07-23 20:27:58 +0200
committerStefan Metzmacher <metze@samba.org>2012-07-24 18:44:04 +0200
commited726281b3dc32c6e31b81dd1fb76b0568687623 (patch)
tree4856d16e71ad9d5f2b34c573a9b5b5b40a182a2a /source3/libsmb
parent552dda970c6b665a36cf2af56142eb1456883528 (diff)
downloadsamba-ed726281b3dc32c6e31b81dd1fb76b0568687623.tar.gz
samba-ed726281b3dc32c6e31b81dd1fb76b0568687623.tar.bz2
samba-ed726281b3dc32c6e31b81dd1fb76b0568687623.zip
s3:libsmb: use a smbXcli_tcon instead of uint16_t cli_state->smb1.tid
metze
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clientgen.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 47cb0f30dd..ae0350b465 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -271,7 +271,11 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
cli->smb1.pid = (uint16_t)getpid();
cli->smb1.vc_num = cli->smb1.pid;
- cli->smb1.tid = UINT16_MAX;
+ cli->smb1.tcon = smbXcli_tcon_create(cli);
+ if (cli->smb1.tcon == NULL) {
+ goto error;
+ }
+ smb1cli_tcon_set_id(cli->smb1.tcon, UINT16_MAX);
cli->smb1.session = smbXcli_session_create(cli, cli->conn);
if (cli->smb1.session == NULL) {
goto error;
@@ -394,13 +398,13 @@ bool cli_state_has_tcon(struct cli_state *cli)
uint16_t cli_state_get_tid(struct cli_state *cli)
{
- return cli->smb1.tid;
+ return smb1cli_tcon_current_id(cli->smb1.tcon);
}
uint16_t cli_state_set_tid(struct cli_state *cli, uint16_t tid)
{
- uint16_t ret = cli->smb1.tid;
- cli->smb1.tid = tid;
+ uint16_t ret = smb1cli_tcon_current_id(cli->smb1.tcon);
+ smb1cli_tcon_set_id(cli->smb1.tcon, tid);
return ret;
}