This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

master - cman: Clean shutdown_con if the controlling process iskilled.


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=e5d433e74f26ddab3e7eedb4c50f2b3546738ecd
Commit:        e5d433e74f26ddab3e7eedb4c50f2b3546738ecd
Parent:        7967567982877f3896305e3fe3c45b64c1cac842
Author:        Christine Caulfield <ccaulfie@redhat.com>
AuthorDate:    Fri Sep 19 13:02:40 2008 +0100
Committer:     Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Fri Sep 19 13:02:40 2008 +0100

cman: Clean shutdown_con if the controlling process is killed.

If a shutdown is initiated by a process that is then killed, the
shutdown_con isn't cleared. So if another process replies to the
shutdown request cman could segfault.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
 cman/daemon/commands.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index 5a843b6..ca68244 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -1536,6 +1536,11 @@ void unbind_con(struct connection *con)
 
 		check_shutdown_status();
 	}
+
+	/* If the controlling shutdown process has quit, then cancel the
+	   shutdown session */
+	if (con == shutdown_con)
+		shutdown_con = NULL;
 }
 
 /* Post a PORT OPEN/CLOSE event to anyone listening on this end */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]