diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-07-23 20:57:23 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-07-24 18:44:05 +0200 |
commit | 29dc01b1755081b1b7a9b38ad4f7e6fdaa795bf9 (patch) | |
tree | 55393ce4a7d041d37a8f12c836ada8456713cd2c /source4 | |
parent | ed726281b3dc32c6e31b81dd1fb76b0568687623 (diff) | |
download | samba-29dc01b1755081b1b7a9b38ad4f7e6fdaa795bf9.tar.gz samba-29dc01b1755081b1b7a9b38ad4f7e6fdaa795bf9.tar.bz2 samba-29dc01b1755081b1b7a9b38ad4f7e6fdaa795bf9.zip |
s4:libcli/raw: setup a smbXcli_tcon for each smbcli_tree
metze
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/raw/clitree.c | 6 | ||||
-rw-r--r-- | source4/libcli/raw/libcliraw.h | 1 | ||||
-rw-r--r-- | source4/libcli/raw/rawrequest.c | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c index a47b395a6b..1c3321e6b8 100644 --- a/source4/libcli/raw/clitree.c +++ b/source4/libcli/raw/clitree.c @@ -24,6 +24,7 @@ #include "libcli/raw/libcliraw.h" #include "libcli/raw/raw_proto.h" #include "libcli/smb_composite/smb_composite.h" +#include "../libcli/smb/smbXcli_base.h" #define SETUP_REQUEST_TREE(cmd, wct, buflen) do { \ req = smbcli_request_setup(tree, cmd, wct, buflen); \ @@ -49,6 +50,11 @@ _PUBLIC_ struct smbcli_tree *smbcli_tree_init(struct smbcli_session *session, tree->session = talloc_reference(tree, session); } + tree->smbXcli = smbXcli_tcon_create(tree); + if (tree->smbXcli == NULL) { + talloc_free(tree); + return NULL; + } return tree; } diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 8cdccc1f45..b269471081 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -188,6 +188,7 @@ struct smbcli_tree { /* session layer info */ struct smbcli_session *session; + struct smbXcli_tcon *smbXcli; uint16_t tid; /* tree id, aka cnum */ char *device; char *fs_type; diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c index 56bbf259e1..9cabea5c78 100644 --- a/source4/libcli/raw/rawrequest.c +++ b/source4/libcli/raw/rawrequest.c @@ -169,6 +169,8 @@ struct smbcli_request *smbcli_request_setup(struct smbcli_tree *tree, req = smbcli_request_setup_session(tree->session, command, wct, buflen); if (req) { + smb1cli_tcon_set_id(tree->smbXcli, tree->tid); + req->tree = tree; SSVAL(req->out.hdr,HDR_TID,tree->tid); } |