osaf/services/saf/amf/amfd/include/si.h | 1 +
osaf/services/saf/amf/amfd/si_dep.cc | 27 +++++++++++++--------------
2 files changed, 14 insertions(+), 14 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
@@ -157,6 +157,7 @@ public:
void update_self_si_dep_state();
void take_action();
void perform_role_failover();
+ uint32_t process_assignment(AVD_CL_CB *cb);
private:
AVD_SI(const AVD_SI&);
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
@@ -161,7 +161,6 @@ AmfDb<std::pair<std::string, std::string
/* static function prototypes */
static void sidep_update_si_dep_state_for_spons_unassign(AVD_CL_CB *cb, AVD_SI
*dep_si, AVD_SI_DEP *si_dep_rec);
-static uint32_t sidep_sg_red_si_process_assignment(AVD_CL_CB *cb, AVD_SI *si);
static uint32_t sidep_si_dep_state_evt_send(AVD_CL_CB *cb, AVD_SI *si,
AVD_EVT_TYPE evt_type);
static uint32_t sidep_cyclic_dep_find(AVD_SI_DEP *sidep);
static void sidep_si_dep_start_unassign(AVD_CL_CB *cb, AVD_EVT *evt);
@@ -452,26 +451,26 @@ done:
* NOTES:
*
**************************************************************************/
-uint32_t sidep_sg_red_si_process_assignment(AVD_CL_CB *cb, AVD_SI *si)
+uint32_t AVD_SI::process_assignment(AVD_CL_CB *cb)
{
uint32_t rc = NCSCC_RC_FAILURE;
- TRACE_ENTER2("'%s'", si->name.value);
+ TRACE_ENTER2("'%s'", name.value);
- if (si->sg_of_si->sg_fsm_state != AVD_SG_FSM_STABLE) {
- TRACE("sg unstable, so defering sidep action on
si:'%s'",si->name.value);
+ if (sg_of_si->sg_fsm_state != AVD_SG_FSM_STABLE) {
+ TRACE("sg unstable, so defering sidep action on si:'%s'",
name.value);
goto done;
}
- if ((si->saAmfSIAdminState == SA_AMF_ADMIN_UNLOCKED) &&
+ if ((saAmfSIAdminState == SA_AMF_ADMIN_UNLOCKED) &&
(cb->init_state == AVD_APP_STATE)) {
- LOG_NO("Assigning due to dep '%s'",si->name.value);
- if (si->sg_of_si->si_assign(cb, si) != NCSCC_RC_SUCCESS) {
+ LOG_NO("Assigning due to dep '%s'", name.value);
+ if (sg_of_si->si_assign(cb, this) != NCSCC_RC_SUCCESS) {
goto done;
}
- if (si->si_active() == true) {
- si->set_dep_state(AVD_SI_ASSIGNED);
+ if (si_active() == true) {
+ set_dep_state(AVD_SI_ASSIGNED);
rc = NCSCC_RC_SUCCESS;
}
}
@@ -595,7 +594,7 @@ void avd_sidep_tol_tmr_evh(AVD_CL_CB *cb
if (si->si_active() == true)
si->set_dep_state(AVD_SI_ASSIGNED);
else
- sidep_sg_red_si_process_assignment(cb, si);
+ si->process_assignment(cb);
} else {
/*Atleast one sponsor is unassigned. If dependent is already
unassigned then
@@ -757,7 +756,7 @@ void avd_sidep_assign_evh(AVD_CL_CB *cb,
/*Check sponsors state once agian then take action*/
dep_si->update_self_si_dep_state();
if (dep_si->si_dep_state == AVD_SI_READY_TO_ASSIGN) {
- if ((sidep_sg_red_si_process_assignment(avd_cb, dep_si)
== NCSCC_RC_FAILURE) &&
+ if ((dep_si->process_assignment(avd_cb) ==
NCSCC_RC_FAILURE) &&
(dep_si->num_dependents != 0)) {
dep_si->take_action_on_dependents();
}
@@ -2325,7 +2324,7 @@ void AVD_SI::take_action()
dependents post SG stable screening.
*/
if (spons_si_list == NULL) {
- sidep_sg_red_si_process_assignment(avd_cb,
this);
+ process_assignment(avd_cb);
}
else
sidep_si_dep_state_evt_send(avd_cb, this,
AVD_EVT_ASSIGN_SI_DEP_STATE);
@@ -2363,7 +2362,7 @@ void AVD_SI::take_action()
if ((si_active() == false) &&
(saAmfSIAdminState == SA_AMF_ADMIN_UNLOCKED)) {
/*This is a SI with no sponsor. Assign it.*/
- sidep_sg_red_si_process_assignment(avd_cb,
this);
+ process_assignment(avd_cb);
}
if (num_dependents > 0) {
/*This is an unassigned SI with dependents but
no sponsors.
------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel