]> git.proxmox.com Git - mirror_corosync.git/commitdiff
NOTIFYD: prevent duplicate quorate events.
authorAngus Salkeld <asalkeld@redhat.com>
Sat, 26 Mar 2011 11:09:29 +0000 (22:09 +1100)
committerAngus Salkeld <asalkeld@redhat.com>
Tue, 29 Mar 2011 02:48:09 +0000 (13:48 +1100)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
tools/corosync-notifyd.c

index 4a58189dade8b96f11379cc0103cdf2eae8af044..7f231fa05ab3dab594a51a4ddf5daa5ee2f8d88d 100644 (file)
@@ -70,6 +70,8 @@ enum {
 };
 static int conf[CS_NTF_MAX];
 
+static int32_t _cs_is_quorate = 0;
+
 typedef void (*node_membership_fn_t)(char *nodename, uint32_t nodeid, char *state, char* ip);
 typedef void (*node_quorum_fn_t)(char *nodename, uint32_t nodeid, const char *state);
 typedef void (*application_connection_fn_t)(char *nodename, uint32_t nodeid, char *app_name, const char *state);
@@ -365,6 +367,11 @@ static void _cs_quorum_notification(quorum_handle_t handle,
        uint32_t quorate, uint64_t ring_seq,
        uint32_t view_list_entries, uint32_t *view_list)
 {
+       if (_cs_is_quorate == quorate) {
+               return;
+       }
+       _cs_is_quorate = quorate;
+
        if (quorate) {
                _cs_node_quorum_event("quorate");
        } else {