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

Michael Adam obnox at samba.org
Thu Jun 26 10:59:02 GMT 2008


The branch, v3-3-test has been updated
       via  fee770e5d080b0513418e61e469f2824a1d771ec (commit)
       via  7bbf29137bf051044cbf0db8d9fe564a7c9d7a29 (commit)
       via  3baf9eb6a2cc6a4a153303b457d3a7067948495e (commit)
       via  e6a403209c29bd2ec2242d654ad45276de02cb44 (commit)
       via  e9177ec56a8fe596d6fcfc4a95df87e39f757818 (commit)
       via  e710a9b73ea2fd176de7093125bc5f3f3f3a9404 (commit)
       via  3e0c24323af5f10fa68ae8aad552b7346536c908 (commit)
       via  fae4c21b14b9d288e06f6b4b4e1527e2c6d58dca (commit)
       via  3b6541ff483d5fea4fd30bb6a01a560c05028d4e (commit)
      from  6725b751d88b4bacac5171efe4f5193bc1125f19 (commit)

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


- Log -----------------------------------------------------------------
commit fee770e5d080b0513418e61e469f2824a1d771ec
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 24 15:09:37 2008 +0200

    ctdbd_connect: bump debug level to 1 for "connect failed" message.
    
    Leave level 0 message for higher level callers.
    
    Michael

commit 7bbf29137bf051044cbf0db8d9fe564a7c9d7a29
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 24 15:08:21 2008 +0200

    messages: bump debug level to 1 for "messaging_ctdb_init failed".
    
    Leave level 0 messages to higher level callers.
    
    Michael

commit 3baf9eb6a2cc6a4a153303b457d3a7067948495e
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 24 12:46:13 2008 +0200

    nmbd: untangle logic in nmbd_messaging_context() slightly.
    
    Michael

commit e6a403209c29bd2ec2242d654ad45276de02cb44
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 24 12:44:50 2008 +0200

    nmbd: don't panic if messaging_init() fails - return NULL instead.
    
    Michael

commit e9177ec56a8fe596d6fcfc4a95df87e39f757818
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 24 12:34:49 2008 +0200

    winbind: remove duplicate debug message for failing messaging_init().
    
    Leave the message inside winbind_messaging_context() for now.
    There might be callers, where this debug message could prove useful...
    
    Michael

commit e710a9b73ea2fd176de7093125bc5f3f3f3a9404
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 24 12:30:38 2008 +0200

    winbind: untangle logic in winbind_messaging_context() slightly.
    
    Michael

commit 3e0c24323af5f10fa68ae8aad552b7346536c908
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 24 12:29:05 2008 +0200

    winbindd: don't panic if messaging_init() fails - return NULL instead.
    
    Leave appropriate handling to the callers.
    
    Michael

commit fae4c21b14b9d288e06f6b4b4e1527e2c6d58dca
Author: Michael Adam <obnox at samba.org>
Date:   Mon Jun 23 17:35:08 2008 +0200

    smbd: untangle logic in smbd_messaging_context() slightly.
    
    Michael

commit 3b6541ff483d5fea4fd30bb6a01a560c05028d4e
Author: Michael Adam <obnox at samba.org>
Date:   Mon Jun 23 17:32:32 2008 +0200

    smbd: don't panic if messaging_init() fails but return NULL
    
    leaving panic or more appropriate action to callers.
    This can for instance happen in a clustered setup, when
    ctdb is not running. This allows for a more defined behaviour,
    reducing chicken-egg-problems.
    
    Michael

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

Summary of changes:
 source/lib/ctdbd_conn.c    |    2 +-
 source/lib/messages.c      |    4 ++--
 source/nmbd/nmbd.c         |    9 ++++++---
 source/smbd/server.c       |    9 ++++++---
 source/winbindd/winbindd.c |   10 ++++++----
 5 files changed, 21 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/ctdbd_conn.c b/source/lib/ctdbd_conn.c
index 46936c5..e8d3fd1 100644
--- a/source/lib/ctdbd_conn.c
+++ b/source/lib/ctdbd_conn.c
@@ -136,7 +136,7 @@ static NTSTATUS ctdbd_connect(TALLOC_CTX *mem_ctx,
 	strncpy(addr.sun_path, sockname, sizeof(addr.sun_path));
 
 	if (sys_connect(fd, (struct sockaddr *)&addr) == -1) {
-		DEBUG(0, ("connect(%s) failed: %s\n", sockname,
+		DEBUG(1, ("connect(%s) failed: %s\n", sockname,
 			  strerror(errno)));
 		close(fd);
 		return map_nt_error_from_unix(errno);
diff --git a/source/lib/messages.c b/source/lib/messages.c
index ea03f8d..f5933ca 100644
--- a/source/lib/messages.c
+++ b/source/lib/messages.c
@@ -211,7 +211,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
 		status = messaging_ctdbd_init(ctx, ctx, &ctx->remote);
 
 		if (!NT_STATUS_IS_OK(status)) {
-			DEBUG(0, ("messaging_ctdb_init failed: %s\n",
+			DEBUG(1, ("messaging_ctdb_init failed: %s\n",
 				  nt_errstr(status)));
 			TALLOC_FREE(ctx);
 			return NULL;
@@ -246,7 +246,7 @@ NTSTATUS messaging_reinit(struct messaging_context *msg_ctx)
 					      &msg_ctx->remote);
 
 		if (!NT_STATUS_IS_OK(status)) {
-			DEBUG(0, ("messaging_ctdb_init failed: %s\n",
+			DEBUG(1, ("messaging_ctdb_init failed: %s\n",
 				  nt_errstr(status)));
 			return status;
 		}
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c
index af4acc8..46c3f1d 100644
--- a/source/nmbd/nmbd.c
+++ b/source/nmbd/nmbd.c
@@ -52,9 +52,12 @@ struct messaging_context *nmbd_messaging_context(void)
 {
 	static struct messaging_context *ctx;
 
-	if (!ctx && !(ctx = messaging_init(NULL, server_id_self(),
-					   nmbd_event_context()))) {
-		smb_panic("Could not init nmbd messaging context");
+	if (ctx == NULL) {
+		ctx = messaging_init(NULL, server_id_self(),
+				     nmbd_event_context());
+	}
+	if (ctx == NULL) {
+		DEBUG(0, ("Could not init nmbd messaging context.\n"));
 	}
 	return ctx;
 }
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 035469c..4a0e60a 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -90,9 +90,12 @@ struct messaging_context *smbd_messaging_context(void)
 {
 	static struct messaging_context *ctx;
 
-	if (!ctx && !(ctx = messaging_init(NULL, server_id_self(),
-					   smbd_event_context()))) {
-		smb_panic("Could not init smbd messaging context");
+	if (ctx == NULL) {
+		ctx = messaging_init(NULL, server_id_self(),
+				     smbd_event_context());
+	}
+	if (ctx == NULL) {
+		DEBUG(0, ("Could not init smbd messaging context.\n"));
 	}
 	return ctx;
 }
diff --git a/source/winbindd/winbindd.c b/source/winbindd/winbindd.c
index c017916..ec3bf68 100644
--- a/source/winbindd/winbindd.c
+++ b/source/winbindd/winbindd.c
@@ -47,9 +47,12 @@ struct messaging_context *winbind_messaging_context(void)
 {
 	static struct messaging_context *ctx;
 
-	if (!ctx && !(ctx = messaging_init(NULL, server_id_self(),
-					   winbind_event_context()))) {
-		smb_panic("Could not init winbind messaging context");
+	if (ctx == NULL) {
+		ctx = messaging_init(NULL, server_id_self(),
+				     winbind_event_context());
+	}
+	if (ctx == NULL) {
+		DEBUG(0, ("Could not init winbind messaging context.\n"));
 	}
 	return ctx;
 }
@@ -1128,7 +1131,6 @@ int main(int argc, char **argv, char **envp)
 	/* Initialise messaging system */
 
 	if (winbind_messaging_context() == NULL) {
-		DEBUG(0, ("unable to initialize messaging system\n"));
 		exit(1);
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list