summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-02-02 13:39:56 +0100
committerMichael Adam <obnox@samba.org>2012-02-03 11:10:30 +0100
commit97823b69e9624a1cd59a42fe4c6a6e14896b7ae7 (patch)
tree28c2ceecd3e2bc8342e6b85789a99bcaa9e51774 /source4
parentce5fc22896a5475a33ee03ab6a1babf4159ebe57 (diff)
downloadsamba-97823b69e9624a1cd59a42fe4c6a6e14896b7ae7.tar.gz
samba-97823b69e9624a1cd59a42fe4c6a6e14896b7ae7.tar.bz2
samba-97823b69e9624a1cd59a42fe4c6a6e14896b7ae7.zip
s4:libcli/torture:smb2: change smb2_tree_connect to take a smb2_session instead of smb2_tree arguement.
Only the tree->session is needed. This way it is less confusing. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/smb2/connect.c2
-rw-r--r--source4/libcli/smb2/tcon.c10
-rw-r--r--source4/torture/smb2/notify.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c
index 6b980f2e0e..b28013fc94 100644
--- a/source4/libcli/smb2/connect.c
+++ b/source4/libcli/smb2/connect.c
@@ -214,7 +214,7 @@ static void smb2_connect_session_done(struct tevent_req *subreq)
return;
}
- smb2req = smb2_tree_connect_send(state->tree, &state->tcon);
+ smb2req = smb2_tree_connect_send(state->session, &state->tcon);
if (tevent_req_nomem(smb2req, req)) {
return;
}
diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c
index c5e5b99f73..3a0f246022 100644
--- a/source4/libcli/smb2/tcon.c
+++ b/source4/libcli/smb2/tcon.c
@@ -46,17 +46,17 @@ struct smb2_tree *smb2_tree_init(struct smb2_session *session,
/*
send a tree connect
*/
-struct smb2_request *smb2_tree_connect_send(struct smb2_tree *tree,
+struct smb2_request *smb2_tree_connect_send(struct smb2_session *session,
struct smb2_tree_connect *io)
{
struct smb2_request *req;
NTSTATUS status;
- req = smb2_request_init(tree->session->transport, SMB2_OP_TCON,
+ req = smb2_request_init(session->transport, SMB2_OP_TCON,
0x08, true, 0);
if (req == NULL) return NULL;
- req->session = tree->session;
+ req->session = session;
SSVAL(req->out.body, 0x02, io->in.reserved);
status = smb2_push_o16s16_string(&req->out, 0x04, io->in.path);
@@ -104,8 +104,8 @@ NTSTATUS smb2_tree_connect_recv(struct smb2_request *req, struct smb2_tree_conne
/*
sync tree connect request
*/
-NTSTATUS smb2_tree_connect(struct smb2_tree *tree, struct smb2_tree_connect *io)
+NTSTATUS smb2_tree_connect(struct smb2_session *session, struct smb2_tree_connect *io)
{
- struct smb2_request *req = smb2_tree_connect_send(tree, io);
+ struct smb2_request *req = smb2_tree_connect_send(session, io);
return smb2_tree_connect_recv(req, io);
}
diff --git a/source4/torture/smb2/notify.c b/source4/torture/smb2/notify.c
index 070af0de9e..e4e26365e3 100644
--- a/source4/torture/smb2/notify.c
+++ b/source4/torture/smb2/notify.c
@@ -1812,7 +1812,7 @@ static struct smb2_tree *secondary_tcon(struct smb2_tree *tree,
ZERO_STRUCT(tcon.smb2);
tcon.generic.level = RAW_TCON_SMB2;
tcon.smb2.in.path = talloc_asprintf(tctx, "\\\\%s\\%s", host, share);
- status = smb2_tree_connect(tree, &(tcon.smb2));
+ status = smb2_tree_connect(tree->session, &(tcon.smb2));
if (!NT_STATUS_IS_OK(status)) {
talloc_free(tree1);
torture_comment(tctx,"Failed to create secondary tree\n");