Quorum checks the ring ID is new before initiating a sync. Unfortunately

it copies the ring ID BEFORE checking it so there is always a match.

Sigh

This patch fixes it.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1807 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Christine Caulfield 2009-03-10 09:58:07 +00:00
parent 64aab2e950
commit 83aec0b84a

View File

@ -116,8 +116,6 @@ static void quorum_api_set_quorum(unsigned int *view_list,
log_printf (LOG_LEVEL_NOTICE, "This node is within the non-primary component and will NOT provide any services.\n");
}
memcpy(&quorum_ring_id, ring_id, sizeof (quorum_ring_id));
quorum_view_list_entries = view_list_entries;
/* Tell sync() only if there is a new ring_id (ie this is not a 'fake' quorum event) */
@ -125,6 +123,7 @@ static void quorum_api_set_quorum(unsigned int *view_list,
sync_primary_callback_fn(view_list, view_list_entries,
primary_designated, ring_id);
}
memcpy(&quorum_ring_id, ring_id, sizeof (quorum_ring_id));
memcpy(quorum_view_list, view_list, sizeof(unsigned int)*view_list_entries);
/* Tell internal listeners */