This patch fixes a problem when determining the lowest_nodeid in
confchg function of the message service.
- Need to set lowest_nodeid to 0xffffffff for comparison to work.
- Since saMsg does not use a global should_sync flag, we simply need
to determine the new lowest nodeid whenever a config change occurs.
Index: services/msg.c
===================================================================
--- services/msg.c (revision 1844)
+++ services/msg.c (working copy)
@@ -1091,7 +1091,7 @@
const unsigned int *joined_list, size_t joined_list_entries,
const struct memb_ring_id *ring_id)
{
- unsigned int i, j;
+ unsigned int i;
log_printf (LOGSYS_LEVEL_NOTICE, "[DEBUG]: msg_confchg_fn\n");
@@ -1107,13 +1107,11 @@
msg_sync_state = MSG_SYNC_STATE_STARTED;
- for (i = 0; i < msg_member_list_entries; i++) {
- for (j = 0; j < member_list_entries; j++) {
- if (msg_member_list[i] == member_list[j]) {
- if (lowest_nodeid > member_list[j]) {
- lowest_nodeid = member_list[j];
- }
- }
+ lowest_nodeid = 0xffffffff;
+
+ for (i = 0; i < member_list_entries; i++) {
+ if (lowest_nodeid > member_list[i]) {
+ lowest_nodeid = member_list[i];
}
}
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais