public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* master - cman: Clean shutdown_con if the controlling process is killed.
@ 2008-09-19 12:06 Christine Caulfield
  0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2008-09-19 12:06 UTC (permalink / raw)
  To: cluster-cvs-relay

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 */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-19 12:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-19 12:06 master - cman: Clean shutdown_con if the controlling process is killed Christine Caulfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).