summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-05-17 08:47:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:34 -0500
commitc42219d7352bd2e7a6413f7ae1cd0fd5cded1d95 (patch)
treec45f3949f0e5f434f129c6346a99d3fa0aab96df /source4/torture/raw
parentad1cde253e5938acf2c57458b5af04f32f45edbf (diff)
downloadsamba-c42219d7352bd2e7a6413f7ae1cd0fd5cded1d95.tar.gz
samba-c42219d7352bd2e7a6413f7ae1cd0fd5cded1d95.tar.bz2
samba-c42219d7352bd2e7a6413f7ae1cd0fd5cded1d95.zip
r22969: fix some more places where we could end up with more than one event
context. We now have an event context on the torture_context, and we can also get one from the cli_credentials structure (This used to be commit c0f65eb6562e13530337c23e3447a6aa6eb8fc17)
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/composite.c2
-rw-r--r--source4/torture/raw/open.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/source4/torture/raw/composite.c b/source4/torture/raw/composite.c
index b551af00b1..e68ebcc824 100644
--- a/source4/torture/raw/composite.c
+++ b/source4/torture/raw/composite.c
@@ -164,7 +164,7 @@ static BOOL test_fetchfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("testing parallel fetchfile with %d ops\n", torture_numops);
- event_ctx = event_context_init(mem_ctx);
+ event_ctx = cli->transport->socket->event.ctx;
c = talloc_array(mem_ctx, struct composite_context *, torture_numops);
for (i=0; i<torture_numops; i++) {
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 3c6b1e2fa5..035d689016 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -27,6 +27,8 @@
#include "lib/events/events.h"
#include "libcli/libcli.h"
#include "torture/util.h"
+#include "auth/credentials/credentials.h"
+#include "lib/cmdline/popt_common.h"
/* enum for whether reads/writes are possible on a file */
enum rdwr_mode {RDWR_NONE, RDWR_RDONLY, RDWR_WRONLY, RDWR_RDWR};
@@ -1351,7 +1353,7 @@ static BOOL test_raw_open_multi(void)
int num_ok = 0;
int num_collision = 0;
- ev = event_context_init(mem_ctx);
+ ev = cli_credentials_get_event_context(cmdline_credentials);
clients = talloc_array(mem_ctx, struct smbcli_state *, num_files);
requests = talloc_array(mem_ctx, struct smbcli_request *, num_files);
ios = talloc_array(mem_ctx, union smb_open, num_files);