From: Stefan Metzmacher Date: Wed, 14 Jan 2009 11:21:43 +0000 (+0100) Subject: s3: reinit_after_fork() should reinit the event context before the messaging context X-Git-Tag: samba-4.0.0alpha7~466 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26e863e6dd864d6466165adebce716f79bec73b6;p=thirdparty%2Fsamba.git s3: reinit_after_fork() should reinit the event context before the messaging context Because messaging_reinit() may add events to the event context, which will removed by event_context_reinit(). metze --- diff --git a/source3/lib/util.c b/source3/lib/util.c index 70eabbfa99e..2485d1def57 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -966,6 +966,10 @@ bool reinit_after_fork(struct messaging_context *msg_ctx, return false; } + if (ev_ctx) { + event_context_reinit(ev_ctx); + } + if (msg_ctx) { /* * For clustering, we need to re-init our ctdbd connection after the @@ -979,10 +983,6 @@ bool reinit_after_fork(struct messaging_context *msg_ctx, } } - if (ev_ctx) { - event_context_reinit(ev_ctx); - } - return true; }