From ab4d635b92b116b02b88843b4ec4f5b7517bab1a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 26 Sep 2005 11:47:55 +0000 Subject: 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) --- source4/torture/raw/composite.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source4/torture/raw/composite.c') 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;itree, &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; iasync.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; itree,&io1); c[i]->async.fn = loadfile_complete; - c[i]->async.private = count; + c[i]->async.private_data = count; } printf("waiting for completion\n"); -- cgit