Просмотр исходного кода

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

Christine Caulfield 17 лет назад
Родитель
Сommit
83aec0b84a
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      exec/vsf_quorum.c

+ 1 - 2
exec/vsf_quorum.c

@@ -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");
 		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;
 	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) */
 	/* 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,
 		sync_primary_callback_fn(view_list, view_list_entries,
 					 primary_designated, ring_id);
 					 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);
 	memcpy(quorum_view_list, view_list, sizeof(unsigned int)*view_list_entries);
 
 
 	/* Tell internal listeners */
 	/* Tell internal listeners */