svn commit: samba r18243 - in branches/SAMBA_4_0/source/libcli/composite: .

tridge at samba.org tridge at samba.org
Fri Sep 8 03:06:47 GMT 2006


Author: tridge
Date: 2006-09-08 03:06:47 +0000 (Fri, 08 Sep 2006)
New Revision: 18243

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18243

Log:

when setting up a composite continuation, if the context has already
finished when we need to trigger the continuation immediately. 

Via a fairly complex path, this fixes the problem where all hosts in
the build farm that do not have ipv6 failed a lot of the RPC
tests. This happened because the dcerpc_connect() async code used a
composite_continue() on a context which was already in an error state,
due to the socket backend saying that ipv6 was unavailable

Modified:
   branches/SAMBA_4_0/source/libcli/composite/composite.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/composite/composite.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/composite/composite.c	2006-09-08 01:16:25 UTC (rev 18242)
+++ branches/SAMBA_4_0/source/libcli/composite/composite.c	2006-09-08 03:06:47 UTC (rev 18243)
@@ -142,6 +142,13 @@
 	if (composite_nomem(new_ctx, ctx)) return;
 	new_ctx->async.fn = continuation;
 	new_ctx->async.private_data = private_data;
+
+	/* if we are setting up a continuation, and the context has
+	   already finished, then we should run the callback with an
+	   immediate event, otherwise we can be stuck forever */
+	if (new_ctx->state >= COMPOSITE_STATE_DONE && continuation) {
+		event_add_timed(new_ctx->event_ctx, new_ctx, timeval_zero(), composite_trigger, new_ctx);
+	}
 }
 
 _PUBLIC_ void composite_continue_rpc(struct composite_context *ctx,



More information about the samba-cvs mailing list