osaf/services/saf/amf/amfd/include/si.h     |   1 +
 osaf/services/saf/amf/amfd/include/si_dep.h |   1 -
 osaf/services/saf/amf/amfd/si_dep.cc        |  28 ++++++++++++++--------------
 3 files changed, 15 insertions(+), 15 deletions(-)


diff --git a/osaf/services/saf/amf/amfd/include/si.h 
b/osaf/services/saf/amf/amfd/include/si.h
--- a/osaf/services/saf/amf/amfd/include/si.h
+++ b/osaf/services/saf/amf/amfd/include/si.h
@@ -158,6 +158,7 @@ public:
        void take_action();
        void perform_role_failover();
        uint32_t process_assignment(AVD_CL_CB *cb);
+       void process_ready_to_unassign_depstate();
 
 private:
        AVD_SI(const AVD_SI&);
diff --git a/osaf/services/saf/amf/amfd/include/si_dep.h 
b/osaf/services/saf/amf/amfd/include/si_dep.h
--- a/osaf/services/saf/amf/amfd/include/si_dep.h
+++ b/osaf/services/saf/amf/amfd/include/si_dep.h
@@ -82,7 +82,6 @@ extern void avd_sidep_update_depstate_su
 extern void avd_sidep_update_depstate_si_failover(AVD_SI *si, AVD_SU *su);
 extern bool avd_sidep_si_dependency_exists_within_su(const AVD_SU *su);
 extern bool avd_sidep_quiesced_done_for_all_dependents(const AVD_SI *si, const 
AVD_SU *su);
-extern void sidep_process_ready_to_unassign_depstate(AVD_SI *dep_si);
 extern void avd_sidep_sg_take_action(AVD_SG *sg);
 
 
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
@@ -213,7 +213,7 @@ void AVD_SI::set_dep_state(AVD_SI_DEP_ST
                /*If a dependent si moves to AVD_SI_READY_TO_UNASSIGN state 
                  then start the tolerance timer.*/
                if (si_dep_state == AVD_SI_READY_TO_UNASSIGN)
-                       sidep_process_ready_to_unassign_depstate(this);
+                       process_ready_to_unassign_depstate();
        }
 }
 
@@ -940,7 +940,7 @@ void AVD_SI::take_action_on_dependents()
                }
 
                if (dep_si->si_dep_state == AVD_SI_READY_TO_UNASSIGN) {
-                       sidep_process_ready_to_unassign_depstate(dep_si);
+                       dep_si->process_ready_to_unassign_depstate();
                } else if (dep_si->si_dep_state == AVD_SI_READY_TO_ASSIGN) { 
                        sidep_si_dep_state_evt_send(avd_cb, dep_si, 
AVD_EVT_ASSIGN_SI_DEP_STATE);
                }
@@ -2338,7 +2338,7 @@ void AVD_SI::take_action()
                                unassign_dependent(avd_cb);
                        else
                                /*For dependent SI start the tolerance timer or 
unassign it*/
-                               sidep_process_ready_to_unassign_depstate(this);
+                               process_ready_to_unassign_depstate();
 
                        break;
                case AVD_SI_SPONSOR_UNASSIGNED:
@@ -2409,41 +2409,41 @@ void avd_sidep_sg_take_action(AVD_SG *sg
  * @return      Nothing 
  *
  **/
-void sidep_process_ready_to_unassign_depstate(AVD_SI *dep_si) 
+void AVD_SI::process_ready_to_unassign_depstate() 
 {
        AVD_SI *spons_si = NULL;
        AVD_SI_DEP *si_dep_rec;
        AVD_SPONS_SI_NODE *temp_spons_list = NULL;
 
-       TRACE_ENTER2("dep si:'%s'", dep_si->name.value);
+       TRACE_ENTER2("dep si:'%s'", name.value);
 
-       for (temp_spons_list = dep_si->spons_si_list; temp_spons_list != NULL;
+       for (temp_spons_list = spons_si_list; temp_spons_list != NULL;
                        temp_spons_list = temp_spons_list->next) {
                spons_si = temp_spons_list->si;
                TRACE("spons si:'%s'",spons_si->name.value);
 
-               si_dep_rec = sidep_db_find(&spons_si->name, &dep_si->name);
+               si_dep_rec = sidep_db_find(&spons_si->name, &name);
                if (si_dep_rec == NULL)
                        goto done;
 
                if (spons_si->si_active() == true) {
                        if (si_dep_rec->si_dep_timer.is_active == true) {
                                avd_stop_tmr(avd_cb, &si_dep_rec->si_dep_timer);
-                               if(dep_si->tol_timer_count > 0)
-                                       dep_si->tol_timer_count--;
+                               if (tol_timer_count > 0)
+                                       tol_timer_count--;
                        }
                } else {
                        if (si_dep_rec->saAmfToleranceTime) {
                                /*start the tolerance timer and set 
si_dep_state to AVD_SI_TOL_TIMER_RUNNING*/
-                               
sidep_update_si_dep_state_for_spons_unassign(avd_cb, dep_si, si_dep_rec);
+                               
sidep_update_si_dep_state_for_spons_unassign(avd_cb, this, si_dep_rec);
                        } else {
                                /*since we are going to unassign the dependent 
stop other timers*/
-                               if (dep_si->tol_timer_count)
-                                       dep_si->stop_tol_timer(avd_cb);
+                               if (tol_timer_count)
+                                       stop_tol_timer(avd_cb);
 
                                if ((avd_cb->avail_state_avd == 
SA_AMF_HA_ACTIVE) &&
-                                               (dep_si->si_dep_state != 
AVD_SI_UNASSIGNING_DUE_TO_DEP))
-                                       sidep_si_dep_state_evt_send(avd_cb, 
dep_si, AVD_EVT_UNASSIGN_SI_DEP_STATE);
+                                               (si_dep_state != 
AVD_SI_UNASSIGNING_DUE_TO_DEP))
+                                       sidep_si_dep_state_evt_send(avd_cb, 
this, AVD_EVT_UNASSIGN_SI_DEP_STATE);
                                break;
                        }       
                }

------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to