[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3362-ga2944e9

Jeremy Allison jra at samba.org
Thu Jan 15 23:52:19 GMT 2009


The branch, v3-2-test has been updated
       via  a2944e99825943f91d0260c218de06817acfcf51 (commit)
      from  76555085fd9bb40a4c0e2c18b5bf965dcf636cb1 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit a2944e99825943f91d0260c218de06817acfcf51
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jan 15 15:51:40 2009 -0800

    Allow reinit_after_fork to be called safely from within swat and other binaries that don't have
    an event context or a msg context. Fixes crash bug in swat.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/lib/util.c |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/util.c b/source/lib/util.c
index 321aedb..1ed70fd 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -1052,18 +1052,22 @@ bool reinit_after_fork(struct messaging_context *msg_ctx,
 		return false;
 	}
 
-	/*
-	 * For clustering, we need to re-init our ctdbd connection after the
-	 * fork
-	 */
-	status = messaging_reinit(msg_ctx);
-	if (!NT_STATUS_IS_OK(status)) {
-		DEBUG(0,("messaging_reinit() failed: %s\n",
-			 nt_errstr(status)));
-		return false;
+	if (msg_ctx) {
+		/*
+		 * For clustering, we need to re-init our ctdbd connection after the
+		 * fork
+		 */
+		status = messaging_reinit(msg_ctx);
+		if (!NT_STATUS_IS_OK(status)) {
+			DEBUG(0,("messaging_reinit() failed: %s\n",
+				 nt_errstr(status)));
+			return false;
+		}
 	}
 
-	event_context_reinit(ev_ctx);
+	if (ev_ctx) {
+		event_context_reinit(ev_ctx);
+	}
 
 	return true;
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list