public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: master - cman: Fix cman_is_listening crash
@ 2009-01-07 16:31 Christine Caulfield
0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2009-01-07 16:31 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=de07e84c99c262bb124250ef9cde3297ce51eacc
Commit: de07e84c99c262bb124250ef9cde3297ce51eacc
Parent: cbd3091cf83f417f8bcd38bda062d7ecb4cdf78c
Author: Christine Caulfield <ccaulfie@redhat.com>
AuthorDate: Wed Jan 7 16:30:09 2009 +0000
Committer: Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Wed Jan 7 16:30:09 2009 +0000
cman: Fix cman_is_listening crash
Also add a nasty hack to get clvmd to start up,
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
cman/services/cman/lib/libcman.c | 7 +++++++
cman/services/cman/services/cman.c | 6 ++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/cman/services/cman/lib/libcman.c b/cman/services/cman/lib/libcman.c
index eab0b7b..dfbdb99 100644
--- a/cman/services/cman/lib/libcman.c
+++ b/cman/services/cman/lib/libcman.c
@@ -146,11 +146,18 @@ static int cmanquorum_check_and_start(struct cman_inst *cman_inst)
static int refresh_node_list(struct cman_inst *cman_inst)
{
int error;
+ cman_callback_t notify_callback;
+
if (cmanquorum_check_and_start(cman_inst))
return -1;
cmanquorum_trackstart(cman_inst->cmq_handle, CS_TRACK_CURRENT);
+
+ // TODO FIXME this is horrible & racy
+ notify_callback = cman_inst->notify_callback;
+ cman_inst->notify_callback = NULL;
error = cmanquorum_dispatch(cman_inst->cmq_handle, CS_DISPATCH_ONE);
+ cman_inst->notify_callback = notify_callback;
return error;
}
diff --git a/cman/services/cman/services/cman.c b/cman/services/cman/services/cman.c
index 8083ace..2b0bd73 100644
--- a/cman/services/cman/services/cman.c
+++ b/cman/services/cman/services/cman.c
@@ -559,8 +559,10 @@ static void message_handler_req_lib_cman_is_listening (void *conn, void *msg)
cman_send_message(0,0, req_lib_cman_is_listening->nodeid, &reqmsg, 1);
}
else {
- res_lib_cman_is_listening.status = get_port_bit(node, req_lib_cman_is_listening->port);
- error = 0;
+ if (node) {
+ res_lib_cman_is_listening.status = get_port_bit(node, req_lib_cman_is_listening->port);
+ error = 0;
+ }
}
res_lib_cman_is_listening.header.size = sizeof(res_lib_cman_is_listening);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-07 16:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-07 16:31 cluster: master - cman: Fix cman_is_listening crash 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).