Hi Anders,

I'll add your comments when I push the code.

Thanks,
Zoran

-----Original Message-----
From: Anders Widell 
Sent: den 18 april 2017 16:06
To: Zoran Milinkovic <[email protected]>; [email protected]
Cc: [email protected]
Subject: Re: [devel] [PATCH 1/1] rde: save a role for active and standby nodes 
in peer info request [#2423]

Ack with comments:

1) Missing space between if statement and opening parenthesis.

2) Line line length exceeds 80 characters

3) The if statement should actually be removed - call SetPeerState() 
unconditionally here.

regards,

Anders Widell


On 04/11/2017 03:10 PM, Zoran Milinkovic wrote:
> When a node with active or standby role sends peer info request, the node 
> role will be saved.
> This will avoid setting the active role to the new starting node.
> ---
>   src/rde/rded/rde_main.cc | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/src/rde/rded/rde_main.cc b/src/rde/rded/rde_main.cc index 
> 977692c..aad9ba6 100644
> --- a/src/rde/rded/rde_main.cc
> +++ b/src/rde/rded/rde_main.cc
> @@ -103,6 +103,9 @@ static void handle_mbx_event() {
>         LOG_NO("Got peer info request from node 0x%x with role %s",
>                msg->fr_node_id, Role::to_string(msg->info.peer_info.ha_role));
>         CheckForSplitBrain(msg);
> +      if(msg->info.peer_info.ha_role == PCS_RDA_ACTIVE || 
> msg->info.peer_info.ha_role == PCS_RDA_STANDBY) {
> +        role->SetPeerState(msg->info.peer_info.ha_role, msg->fr_node_id);
> +      }
>         SendPeerInfoResp(msg->fr_dest);
>         break;
>       }


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to