From: "Fabio M. Di Nitto" <fdinitto@xxxxxxxxxx> Signed-off-by: Fabio M. Di Nitto <fdinitto@xxxxxxxxxx> --- :100644 100644 bc7b3a8... 98dced1... M exec/votequorum.c :100644 100644 8055a20... 0aea2f0... M tools/corosync-quorumtool.c exec/votequorum.c | 14 +++++++++----- tools/corosync-quorumtool.c | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/exec/votequorum.c b/exec/votequorum.c index bc7b3a8..98dced1 100644 --- a/exec/votequorum.c +++ b/exec/votequorum.c @@ -1945,12 +1945,17 @@ static void message_handler_req_lib_votequorum_getinfo (void *conn, const void * unsigned int highest_expected = 0; unsigned int total_votes = 0; cs_error_t error = CS_OK; + uint32_t nodeid = req_lib_votequorum_getinfo->nodeid; ENTER(); log_printf(LOGSYS_LEVEL_DEBUG, "got getinfo request on %p for node %u", conn, req_lib_votequorum_getinfo->nodeid); - node = find_node_by_nodeid(req_lib_votequorum_getinfo->nodeid); + if (nodeid == NODEID_QDEVICE) { + nodeid = us->node_id; + } + + node = find_node_by_nodeid(nodeid); if (node) { struct cluster_node *iternode; struct list_head *nodelist; @@ -1965,10 +1970,9 @@ static void message_handler_req_lib_votequorum_getinfo (void *conn, const void * } } - if (((us->flags & NODE_FLAGS_QDEVICE_REGISTERED) && (qdevice->state == NODESTATE_MEMBER)) || - ((node->flags & NODE_FLAGS_QDEVICE_REGISTERED) && - (node->flags & NODE_FLAGS_QDEVICE_ALIVE) && - (node->flags & NODE_FLAGS_QDEVICE_CAST_VOTE))) { + if ((node->flags & NODE_FLAGS_QDEVICE_REGISTERED) && + (node->flags & NODE_FLAGS_QDEVICE_ALIVE) && + (node->flags & NODE_FLAGS_QDEVICE_CAST_VOTE)) { total_votes += qdevice->votes; } diff --git a/tools/corosync-quorumtool.c b/tools/corosync-quorumtool.c index 8055a20..0aea2f0 100644 --- a/tools/corosync-quorumtool.c +++ b/tools/corosync-quorumtool.c @@ -409,7 +409,7 @@ static int display_quorum_data(int is_quorate, uint32_t nodeid, if ((err == CS_OK) || (err == CS_ERR_NOT_EXIST)) { printf("\nVotequorum information\n"); printf("----------------------\n"); - printf("Node ID: %u\n", nodeid); + printf("Node ID: %u\n", nodeid?nodeid:our_nodeid); printf("Node state: "); if (err == CS_ERR_NOT_EXIST) { printf("Unknown\n"); -- 1.7.7.6 _______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss