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/libcli/composite/composite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/libcli/composite/composite.c') diff --git a/source4/libcli/composite/composite.c b/source4/libcli/composite/composite.c index f04309bbfb..4a5247c9ea 100644 --- a/source4/libcli/composite/composite.c +++ b/source4/libcli/composite/composite.c @@ -34,7 +34,7 @@ NTSTATUS composite_wait(struct composite_context *c) { if (c == NULL) return NT_STATUS_NO_MEMORY; - while (c->state < SMBCLI_REQUEST_DONE) { + while (c->state < COMPOSITE_STATE_DONE) { if (event_loop_once(c->event_ctx) != 0) { return NT_STATUS_UNSUCCESSFUL; } @@ -51,7 +51,6 @@ static void composite_trigger(struct event_context *ev, struct timed_event *te, struct timeval t, void *ptr) { struct composite_context *c = talloc_get_type(ptr, struct composite_context); - c->state = SMBCLI_REQUEST_DONE; if (c->async.fn) { c->async.fn(c); } @@ -65,6 +64,7 @@ static void composite_trigger(struct event_context *ev, struct timed_event *te, */ void composite_trigger_done(struct composite_context *c) { + c->state = COMPOSITE_STATE_DONE; /* a zero timeout means immediate */ event_add_timed(c->event_ctx, c, timeval_zero(), composite_trigger, c); } -- cgit