mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
s4:libcli/raw: setup a smbXcli_tcon for each smbcli_tree
metze
This commit is contained in:
parent
ed726281b3
commit
29dc01b175
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user