From 51b4a41d52c464005e288064d25c4ee8c5203c0a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 9 Oct 2006 11:31:55 +0000 Subject: r19201: rap_cli_do_call only needs smbcli_tree, not smbcli_state (This used to be commit 15c3b5d26eb1a21ce29afbf9f938176efdc0761f) --- source4/torture/rap/rap.c | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c index 66662651d6..b7f594a668 100644 --- a/source4/torture/rap/rap.c +++ b/source4/torture/rap/rap.c @@ -162,7 +162,7 @@ static NTSTATUS rap_pull_string(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr, return NT_STATUS_OK; } -static NTSTATUS rap_cli_do_call(struct smbcli_state *cli, struct rap_call *call) +static NTSTATUS rap_cli_do_call(struct smbcli_tree *tree, struct rap_call *call) { NTSTATUS result; DATA_BLOB param_blob; @@ -177,7 +177,7 @@ static NTSTATUS rap_cli_do_call(struct smbcli_state *cli, struct rap_call *call) params->flags = RAPNDR_FLAGS; trans.in.max_param = call->rcv_paramlen; - trans.in.max_data = smb_raw_max_trans_data(cli->tree, call->rcv_paramlen); + trans.in.max_data = smb_raw_max_trans_data(tree, call->rcv_paramlen); trans.in.max_setup = 0; trans.in.flags = 0; trans.in.timeout = 0; @@ -198,7 +198,7 @@ static NTSTATUS rap_cli_do_call(struct smbcli_state *cli, struct rap_call *call) trans.in.params = ndr_push_blob(params); trans.in.data = data_blob(NULL, 0); - result = smb_raw_trans(cli->tree, call, &trans); + result = smb_raw_trans(tree, call, &trans); if (!NT_STATUS_IS_OK(result)) return result; @@ -218,7 +218,7 @@ static NTSTATUS rap_cli_do_call(struct smbcli_state *cli, struct rap_call *call) goto done; \ } while (0) -static NTSTATUS smbcli_rap_netshareenum(struct smbcli_state *cli, +static NTSTATUS smbcli_rap_netshareenum(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, struct rap_NetShareEnum *r) { @@ -226,7 +226,7 @@ static NTSTATUS smbcli_rap_netshareenum(struct smbcli_state *cli, NTSTATUS result = NT_STATUS_UNSUCCESSFUL; int i; - call = new_rap_cli_call(NULL, RAP_WshareEnum); + call = new_rap_cli_call(tree, RAP_WshareEnum); if (call == NULL) return NT_STATUS_NO_MEMORY; @@ -244,7 +244,7 @@ static NTSTATUS smbcli_rap_netshareenum(struct smbcli_state *cli, break; } - result = rap_cli_do_call(cli, call); + result = rap_cli_do_call(tree, call); if (!NT_STATUS_IS_OK(result)) goto done; @@ -288,16 +288,16 @@ static NTSTATUS smbcli_rap_netshareenum(struct smbcli_state *cli, return result; } -static BOOL test_netshareenum(struct smbcli_state *cli) +static BOOL test_netshareenum(struct smbcli_tree *tree) { struct rap_NetShareEnum r; int i; - TALLOC_CTX *tmp_ctx = talloc_new(cli); + TALLOC_CTX *tmp_ctx = talloc_new(tree); r.in.level = 1; r.in.bufsize = 8192; - if (!NT_STATUS_IS_OK(smbcli_rap_netshareenum(cli, tmp_ctx, &r))) + if (!NT_STATUS_IS_OK(smbcli_rap_netshareenum(tree, tmp_ctx, &r))) return False; for (i=0; itree)) { ret = False; } @@ -548,7 +548,7 @@ BOOL torture_rap_scan(struct torture_context *torture) struct rap_call *call = new_rap_cli_call(mem_ctx, callno); NTSTATUS result; - result = rap_cli_do_call(cli, call); + result = rap_cli_do_call(cli->tree, call); if (!NT_STATUS_EQUAL(result, NT_STATUS_INVALID_PARAMETER)) continue; -- cgit