Redundant ring has some problem in the UDP unicast mode. The problem
is the second ring has not been successfully initialized, that is, the
second time iface_changes happens, the member list for that interface
has not been added, which results in that ring cannot transmit normal
message. So the second ring cannot take over the work if the first
ring is down. This patch fixes this issue.

Signed-off-by: Jiaju Zhang <[email protected]>
---
 exec/totemsrp.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/exec/totemsrp.c b/exec/totemsrp.c
index 9f7f434..678fa64 100644
--- a/exec/totemsrp.c
+++ b/exec/totemsrp.c
@@ -4421,17 +4421,19 @@ void main_iface_change_fn (
                        "Created or loaded sequence id %lld.%s for this 
ring.\n",
                        instance->my_ring_id.seq,
                        totemip_print (&instance->my_ring_id.rep));
-               for (i = 0; i < 
instance->totem_config->interfaces[iface_no].member_count; i++) {
-                       totemsrp_member_add (instance,
-                               
&instance->totem_config->interfaces[iface_no].member_list[i],
-                               iface_no);
 
-               }
                if (instance->totemsrp_service_ready_fn) {
                        instance->totemsrp_service_ready_fn ();
                }
 
        }
+
+       for (i = 0; i < 
instance->totem_config->interfaces[iface_no].member_count; i++) {
+               totemsrp_member_add (instance,
+                       
&instance->totem_config->interfaces[iface_no].member_list[i],
+                       iface_no);
+       }
+
        if (instance->iface_changes >= instance->totem_config->interface_count) 
{
                memb_state_gather_enter (instance, 15);
        }
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to