ACK Reviewed-By: Christine Caulfield <ccaulfie@xxxxxxxxxx> On 02/03/12 11:02, Fabio M. Di Nitto wrote:
From: "Fabio M. Di Nitto"<fdinitto@xxxxxxxxxx> Signed-off-by: Fabio M. Di Nitto<fdinitto@xxxxxxxxxx> --- exec/votequorum.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/exec/votequorum.c b/exec/votequorum.c index 4dab33e..a4243ae 100644 --- a/exec/votequorum.c +++ b/exec/votequorum.c @@ -518,6 +518,18 @@ static int check_low_node_id_partition(void) return found; } +static void decode_flags(uint32_t flags) +{ + log_printf(LOGSYS_LEVEL_DEBUG, + "flags: quorate: %s Leaving: %s WFA Status: %s First: %s Qdevice: %s QdeviceState: %s", + (flags& NODE_FLAGS_QUORATE)?"Yes":"No", + (flags& NODE_FLAGS_LEAVING)?"Yes":"No", + (flags& NODE_FLAGS_WFASTATUS)?"Yes":"No", + (flags& NODE_FLAGS_FIRST)?"Yes":"No", + (flags& NODE_FLAGS_QDEVICE)?"Yes":"No", + (flags& NODE_FLAGS_QDEVICE_STATE)?"Yes":"No"); +} + static void update_wait_for_all_status(uint8_t wfa_status) { wait_for_all_status = wfa_status; @@ -1178,6 +1190,9 @@ static int votequorum_exec_send_nodeinfo(uint32_t nodeid) req_exec_quorum_nodeinfo.votes = node->votes; req_exec_quorum_nodeinfo.expected_votes = node->expected_votes; req_exec_quorum_nodeinfo.flags = node->flags; + if (nodeid != NODEID_QDEVICE) { + decode_flags(node->flags); + } req_exec_quorum_nodeinfo.header.id = SERVICE_ID_MAKE(VOTEQUORUM_SERVICE, MESSAGE_REQ_EXEC_VOTEQUORUM_NODEINFO); req_exec_quorum_nodeinfo.header.size = sizeof(req_exec_quorum_nodeinfo); @@ -1492,6 +1507,10 @@ static void message_handler_req_exec_votequorum_nodeinfo ( req_exec_quorum_nodeinfo->expected_votes, req_exec_quorum_nodeinfo->flags); + if (nodeid != NODEID_QDEVICE) { + decode_flags(req_exec_quorum_nodeinfo->flags); + } + node = find_node_by_nodeid(nodeid); if (!node) { node = allocate_node(nodeid);
_______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss