summaryrefslogtreecommitdiff
path: root/source4/torture/raw/offline.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-17 01:19:20 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-17 01:19:20 +0200
commit06d06c6c9415140167708d09307125067c1f5b87 (patch)
tree35085314859e78dd9ebfd3ee6093a353931f0f0e /source4/torture/raw/offline.c
parentf875669314ce1398367b85f962941dacef6fc828 (diff)
downloadsamba-06d06c6c9415140167708d09307125067c1f5b87.tar.gz
samba-06d06c6c9415140167708d09307125067c1f5b87.tar.bz2
samba-06d06c6c9415140167708d09307125067c1f5b87.zip
Use provided event context rather than looking for it.
(This used to be commit fd0bb96acea3d7949cf0574bb6f3568a90f67f4e)
Diffstat (limited to 'source4/torture/raw/offline.c')
-rw-r--r--source4/torture/raw/offline.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source4/torture/raw/offline.c b/source4/torture/raw/offline.c
index 1340692faa..852cddb996 100644
--- a/source4/torture/raw/offline.c
+++ b/source4/torture/raw/offline.c
@@ -389,7 +389,6 @@ bool torture_test_offline(struct torture_context *torture)
int i;
int timelimit = torture_setting_int(torture, "timelimit", 10);
struct timeval tv;
- struct event_context *ev = event_context_find(mem_ctx);
struct offline_state *state;
struct smbcli_state *cli;
bool progress;
@@ -404,8 +403,8 @@ bool torture_test_offline(struct torture_context *torture)
for (i=0;i<nconnections;i++) {
state[i].tctx = torture;
state[i].mem_ctx = talloc_new(state);
- state[i].ev = ev;
- if (!torture_open_connection_ev(&cli, i, torture, ev)) {
+ state[i].ev = torture->ev;
+ if (!torture_open_connection_ev(&cli, i, torture, torture->ev)) {
return false;
}
state[i].tree = cli->tree;
@@ -418,7 +417,7 @@ bool torture_test_offline(struct torture_context *torture)
for (i=nconnections;i<numstates;i++) {
state[i].tctx = torture;
state[i].mem_ctx = talloc_new(state);
- state[i].ev = ev;
+ state[i].ev = torture->ev;
state[i].tree = state[i % nconnections].tree;
state[i].client = i;
}
@@ -473,7 +472,7 @@ bool torture_test_offline(struct torture_context *torture)
printf("Running for %d seconds\n", timelimit);
while (timeval_elapsed(&tv) < timelimit) {
- event_loop_once(ev);
+ event_loop_once(torture->ev);
if (test_failed) {
DEBUG(0,("test failed\n"));
@@ -487,7 +486,7 @@ bool torture_test_offline(struct torture_context *torture)
while (state[i].loadfile ||
state[i].savefile ||
state[i].req) {
- event_loop_once(ev);
+ event_loop_once(torture->ev);
}
}