diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-03 15:53:07 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:47:27 +0100 |
commit | 0a2f1a46a02d2c9497d05d7e534829dc6e9430dc (patch) | |
tree | 5647b3b0b98f97abc84a47a19613938345e0384c /source4/torture/raw/openbench.c | |
parent | 53ae9bc9f6f66578948c3995073bdc1f1acae0f1 (diff) | |
download | samba-0a2f1a46a02d2c9497d05d7e534829dc6e9430dc.tar.gz samba-0a2f1a46a02d2c9497d05d7e534829dc6e9430dc.tar.bz2 samba-0a2f1a46a02d2c9497d05d7e534829dc6e9430dc.zip |
r26249: Remove a couple more uses of global_loadparm.
(This used to be commit 80a61200508a00d5b16a3e748ce92d54b9fefcd2)
Diffstat (limited to 'source4/torture/raw/openbench.c')
-rw-r--r-- | source4/torture/raw/openbench.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/torture/raw/openbench.c b/source4/torture/raw/openbench.c index a53efb3a8b..3eec9fbb13 100644 --- a/source4/torture/raw/openbench.c +++ b/source4/torture/raw/openbench.c @@ -42,6 +42,7 @@ static int num_connected; static struct timed_event *report_te; struct benchopen_state { + struct torture_context *tctx; TALLOC_CTX *mem_ctx; struct event_context *ev; struct smbcli_state *cli; @@ -116,7 +117,7 @@ static void reopen_connection(struct event_context *ev, struct timed_event *te, state->te = NULL; - if (!torture_get_conn_index(state->client_num, state->mem_ctx, &host, &share)) { + if (!torture_get_conn_index(state->client_num, state->mem_ctx, state->tctx, &host, &share)) { DEBUG(0,("Can't find host/share for reconnect?!\n")); exit(1); } @@ -358,10 +359,11 @@ bool torture_bench_open(struct torture_context *torture) printf("Opening %d connections\n", nprocs); for (i=0;i<nprocs;i++) { + state[i].tctx = torture; state[i].mem_ctx = talloc_new(state); state[i].client_num = i; state[i].ev = ev; - if (!torture_open_connection_ev(&state[i].cli, i, ev)) { + if (!torture_open_connection_ev(&state[i].cli, i, torture, ev)) { return false; } talloc_steal(mem_ctx, state); |