Hi Praveen,

Thanks for your idea.
Yes, your are right. It is better to move the check to the event handler 
of presence state message.

Best regards,
Long Nguyen.

On 5/16/2017 12:54 PM, praveen malviya wrote:
> Hi Long,
>
> This check is very generic.
> During su restart cases, a PI SU having NPI components will send 
> unnecessary enabled events to AMFD. When AMFD will receive this events 
> it will try to assign this SU and can lead to assignments in other 
> than 2N red models cases.
> I think check should be moved to the event handler of presence state 
> message. Attached is the patch based on this idea.
> What do you think?
>
>
> Thanks
> Praveen
>
> On 28-Apr-17 9:42 AM, Long H Buu Nguyen wrote:
>> ---
>>   src/amf/amfnd/susm.cc | 10 ++++++++++
>>   1 file changed, 10 insertions(+)
>>
>> diff --git a/src/amf/amfnd/susm.cc b/src/amf/amfnd/susm.cc
>> index 52af63b83..04ced426d 100644
>> --- a/src/amf/amfnd/susm.cc
>> +++ b/src/amf/amfnd/susm.cc
>> @@ -1608,6 +1608,16 @@ uint32_t avnd_su_pres_fsm_run(AVND_CB *cb, 
>> AVND_SU *su, AVND_COMP *comp,
>>     /* process state change */
>>     if (prv_st != final_st)
>>       rc = avnd_su_pres_st_chng_prc(cb, su, prv_st, final_st);
>> +  else {
>> +    // If SU has been already instantiated, inform amfd
>> +    if (SA_AMF_PRESENCE_INSTANTIATED == final_st &&
>> +        su_all_pi_comps_instantiated(su) == true) {
>> +      if (m_AVND_SU_OPER_STATE_IS_ENABLED(su)) {
>> +        TRACE("SU oper state is enabled");
>> +        rc = avnd_di_oper_send(cb, su, 0);
>> +      }
>> +    }
>> +  }
>>     done:
>>     TRACE_LEAVE2("%u", rc);
>>


------------------------------------------------------------------------------
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