osaf/services/saf/amf/amfd/si_dep.cc | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-)
At many places, there has been tautological errors in si dep flow. The fix corrects them diff --git a/osaf/services/saf/amf/amfd/si_dep.cc b/osaf/services/saf/amf/amfd/si_dep.cc --- a/osaf/services/saf/amf/amfd/si_dep.cc +++ b/osaf/services/saf/amf/amfd/si_dep.cc @@ -1468,10 +1468,10 @@ void avd_sidep_unassign_dependents(AVD_S if (m_NCS_MDS_DEST_EQUAL(&sisu->su->su_on_node->adest,&su->su_on_node->adest)) { avd_si_unassign(dep_si); } else { - if((dep_si->si_dep_state != AVD_SI_TOL_TIMER_RUNNING) || - (dep_si->si_dep_state != AVD_SI_READY_TO_UNASSIGN)) { + /* Don't start tol timer if dep state are either in running or unassigned. */ + if(!((dep_si->si_dep_state == AVD_SI_TOL_TIMER_RUNNING) || + (dep_si->si_dep_state == AVD_SI_READY_TO_UNASSIGN))) { avd_sidep_start_tolerance_timer_for_dependant(dep_si, si); - } } /* If this dependent SI is sponsor too, then unassign its dependents also */ @@ -1788,9 +1788,9 @@ void avd_sidep_update_depstate_si_failov if(su->su_on_node->saAmfNodeOperState == SA_AMF_OPERATIONAL_DISABLED) { if ((m_NCS_MDS_DEST_EQUAL(&sisu->su->su_on_node->adest,&su->su_on_node->adest))) { - if(((dep_si->si_dep_state != AVD_SI_TOL_TIMER_RUNNING) || - (dep_si->si_dep_state != AVD_SI_READY_TO_UNASSIGN) || - (dep_si->si_dep_state != AVD_SI_FAILOVER_UNDER_PROGRESS)) && + if((!((dep_si->si_dep_state == AVD_SI_TOL_TIMER_RUNNING) || + (dep_si->si_dep_state == AVD_SI_READY_TO_UNASSIGN) || + (dep_si->si_dep_state == AVD_SI_FAILOVER_UNDER_PROGRESS))) && (avd_sidep_sponsors_assignment_states(dep_si))) { avd_sidep_si_dep_state_set(dep_si, AVD_SI_FAILOVER_UNDER_PROGRESS); @@ -1801,10 +1801,9 @@ void avd_sidep_update_depstate_si_failov } } } else if (dep_si->sg_of_si == si->sg_of_si) { - if((dep_si->si_dep_state != AVD_SI_TOL_TIMER_RUNNING) || - (dep_si->si_dep_state != AVD_SI_READY_TO_UNASSIGN) || - (dep_si->si_dep_state != AVD_SI_FAILOVER_UNDER_PROGRESS)) { - + if(!((dep_si->si_dep_state == AVD_SI_TOL_TIMER_RUNNING) || + (dep_si->si_dep_state == AVD_SI_READY_TO_UNASSIGN) || + (dep_si->si_dep_state == AVD_SI_FAILOVER_UNDER_PROGRESS))) { avd_sidep_si_dep_state_set(dep_si, AVD_SI_FAILOVER_UNDER_PROGRESS); if (dep_si->num_dependents > 0) { /* This SI also has dependents under it, update their state also */ @@ -1842,9 +1841,9 @@ void avd_sidep_update_depstate_si_failov } if (sponsor_assignments_state == true) { - if((dep_si->si_dep_state != AVD_SI_TOL_TIMER_RUNNING) || - (dep_si->si_dep_state != AVD_SI_READY_TO_UNASSIGN) || - (dep_si->si_dep_state != AVD_SI_FAILOVER_UNDER_PROGRESS)) { + if(!((dep_si->si_dep_state == AVD_SI_TOL_TIMER_RUNNING) || + (dep_si->si_dep_state == AVD_SI_READY_TO_UNASSIGN) || + (dep_si->si_dep_state == AVD_SI_FAILOVER_UNDER_PROGRESS))) { avd_sidep_si_dep_state_set(dep_si, AVD_SI_FAILOVER_UNDER_PROGRESS); if (dep_si->num_dependents > 0) { ------------------------------------------------------------------------------ _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel