diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-07-23 22:22:02 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-07-24 22:20:06 +0200 |
commit | 92efe1a35ff007919e9c23a066a702be8cfd0a9f (patch) | |
tree | 98843425c3d0ea426ef6dfdec6e105e9b3d2de09 | |
parent | 41538b17c5420b1e8e45d3e2987c77bc79c14de5 (diff) | |
download | samba-92efe1a35ff007919e9c23a066a702be8cfd0a9f.tar.gz samba-92efe1a35ff007919e9c23a066a702be8cfd0a9f.tar.bz2 samba-92efe1a35ff007919e9c23a066a702be8cfd0a9f.zip |
s3:libsmb: setup a smbXcli_tcon for SMB2
metze
-rw-r--r-- | source3/include/client.h | 1 | ||||
-rw-r--r-- | source3/libsmb/smb2cli_tcon.c | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source3/include/client.h b/source3/include/client.h index 9617c2a376..00a7e1b40c 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -111,6 +111,7 @@ struct cli_state { uint32_t pid; uint32_t tid; struct smbXcli_session *session; + struct smbXcli_tcon *tcon; /* SMB2 tcon */ uint8_t share_type; diff --git a/source3/libsmb/smb2cli_tcon.c b/source3/libsmb/smb2cli_tcon.c index b56a40282a..615dcfa2d9 100644 --- a/source3/libsmb/smb2cli_tcon.c +++ b/source3/libsmb/smb2cli_tcon.c @@ -130,6 +130,19 @@ static void smb2cli_tcon_done(struct tevent_req *subreq) cli->smb2.maximal_access = IVAL(body, 12); TALLOC_FREE(subreq); + + cli->smb2.tcon = smbXcli_tcon_create(cli); + if (tevent_req_nomem(cli->smb2.tcon, req)) { + return; + } + + smb2cli_tcon_set_values(cli->smb2.tcon, + cli->smb2.tid, + cli->smb2.share_type, + cli->smb2.share_flags, + cli->smb2.share_capabilities, + cli->smb2.maximal_access); + tevent_req_done(req); } @@ -229,6 +242,7 @@ static void smb2cli_tdis_done(struct tevent_req *subreq) return; } state->cli->smb2.tid = 0; + TALLOC_FREE(state->cli->smb2.tcon); tevent_req_done(req); } |