summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-09-26 11:47:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:57 -0500
commitab4d635b92b116b02b88843b4ec4f5b7517bab1a (patch)
tree63c3ee12153b629071d2ba0209a0a31b134c449e /source4/torture/raw
parent0d46be147a1e755bdd6f21a5ddc83b5c39585529 (diff)
downloadsamba-ab4d635b92b116b02b88843b4ec4f5b7517bab1a.tar.gz
samba-ab4d635b92b116b02b88843b4ec4f5b7517bab1a.tar.bz2
samba-ab4d635b92b116b02b88843b4ec4f5b7517bab1a.zip
r10504: - seperate implementation specific stuff, from the generic composite
stuff. - don't use SMBCLI_REQUEST_* state's in the genreic composite stuff - move monitor_fn to libnet. NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR state in the _send() function. I haven't fixed this bugs in this commit! We may need some composite_trigger_*() functions or so. And maybe some other generic helper functions... metze (This used to be commit 4527815a0a9b96e460f301cb1f0c0b3964c166fc)
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/composite.c11
-rw-r--r--source4/torture/raw/context.c1
2 files changed, 7 insertions, 5 deletions
diff --git a/source4/torture/raw/composite.c b/source4/torture/raw/composite.c
index 457bcea7f9..fafdb90ec3 100644
--- a/source4/torture/raw/composite.c
+++ b/source4/torture/raw/composite.c
@@ -24,6 +24,7 @@
#include "lib/events/events.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/composite/composite.h"
+#include "libcli/smb_composite/smb_composite.h"
#include "lib/cmdline/popt_common.h"
#include "librpc/gen_ndr/ndr_security.h"
@@ -31,7 +32,7 @@
static void loadfile_complete(struct composite_context *c)
{
- int *count = talloc_get_type(c->async.private, int);
+ int *count = talloc_get_type(c->async.private_data, int);
(*count)++;
}
@@ -76,7 +77,7 @@ static BOOL test_loadfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
for (i=0;i<num_ops;i++) {
c[i] = smb_composite_loadfile_send(cli->tree, &io2);
c[i]->async.fn = loadfile_complete;
- c[i]->async.private = count;
+ c[i]->async.private_data = count;
}
printf("waiting for completion\n");
@@ -163,7 +164,7 @@ static BOOL test_fetchfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
for (i=0; i<torture_numops; i++) {
c[i] = smb_composite_fetchfile_send(&io2, event_ctx);
c[i]->async.fn = loadfile_complete;
- c[i]->async.private = count;
+ c[i]->async.private_data = count;
}
printf("waiting for completion\n");
@@ -281,7 +282,7 @@ static BOOL test_appendacl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
c[i] = smb_composite_appendacl_send(cli->tree, io[i]);
c[i]->async.fn = loadfile_complete;
- c[i]->async.private = count;
+ c[i]->async.private_data = count;
}
event_ctx = talloc_reference(mem_ctx, cli->tree->session->transport->socket->event.ctx);
@@ -346,7 +347,7 @@ static BOOL test_fsinfo(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
for (i=0; i<torture_numops; i++) {
c[i] = smb_composite_fsinfo_send(cli->tree,&io1);
c[i]->async.fn = loadfile_complete;
- c[i]->async.private = count;
+ c[i]->async.private_data = count;
}
printf("waiting for completion\n");
diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c
index d76882d84d..0fe2c894af 100644
--- a/source4/torture/raw/context.c
+++ b/source4/torture/raw/context.c
@@ -22,6 +22,7 @@
#include "libcli/raw/libcliraw.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "libcli/composite/composite.h"
+#include "libcli/smb_composite/smb_composite.h"
#include "lib/cmdline/popt_common.h"
#include "lib/events/events.h"