osaf/services/saf/amf/amfnd/clc.cc |  27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)


diff --git a/osaf/services/saf/amf/amfnd/clc.cc 
b/osaf/services/saf/amf/amfnd/clc.cc
--- a/osaf/services/saf/amf/amfnd/clc.cc
+++ b/osaf/services/saf/amf/amfnd/clc.cc
@@ -1330,6 +1330,12 @@ uint32_t avnd_comp_clc_uninst_inst_hdler
 
        TRACE_ENTER2("'%s' : Instantiate event in the Uninstantiated state", 
comp->name.value);
 
+       /* Refresh the component configuration, it may have changed */
+       if (!m_AVND_IS_SHUTTING_DOWN(cb) && (avnd_comp_config_reinit(comp) != 
0)) {
+               rc = NCSCC_RC_FAILURE;
+               goto done;
+       }
+
        /*if proxied component check whether the proxy exists, if so continue 
           instantiating by calling the proxied callback. else start timer and 
           wait for inst timeout duration */
@@ -1599,6 +1605,11 @@ uint32_t avnd_comp_clc_xxxing_cleansucc_
        AVND_COMP_CLC_INFO *clc_info = &comp->clc_info;
        uint32_t rc = NCSCC_RC_SUCCESS;
        TRACE_ENTER2("'%s': Cleanup success event in the 
instantiating/restarting state", comp->name.value);
+       /* Refresh the component configuration, it may have changed */
+       if (!m_AVND_IS_SHUTTING_DOWN(cb) && (avnd_comp_config_reinit(comp) != 
0)) {
+               rc = NCSCC_RC_FAILURE;
+               goto done;
+       }
 
        if ((clc_info->inst_retry_cnt < clc_info->inst_retry_max) &&
            (AVND_COMP_INST_EXIT_CODE_NO_RETRY != clc_info->inst_code_rcvd)) {
@@ -1643,7 +1654,7 @@ uint32_t avnd_comp_clc_xxxing_cleansucc_
                /* => retries over... transition to inst-failed state */
                avnd_comp_pres_state_set(comp, 
SA_AMF_PRESENCE_INSTANTIATION_FAILED);
        }
-
+done:
        TRACE_LEAVE();
        return rc;
 }
@@ -2171,6 +2182,12 @@ uint32_t avnd_comp_clc_restart_termsucc_
        uint32_t rc = NCSCC_RC_SUCCESS;
        TRACE_ENTER2("'%s': Terminate success event in the restarting state", 
comp->name.value);
 
+       /* Refresh the component configuration, it may have changed */
+       if (!m_AVND_IS_SHUTTING_DOWN(cb) && (avnd_comp_config_reinit(comp) != 
0)) {
+               rc = NCSCC_RC_FAILURE;
+               goto done;
+       }
+
        if (!m_AVND_COMP_TYPE_IS_PROXIED(comp)) {
                m_AVND_COMP_REG_PARAM_RESET(cb, comp);
                m_AVND_SEND_CKPT_UPDT_ASYNC_UPDT(cb, comp, 
AVND_CKPT_COMP_CONFIG);
@@ -2192,7 +2209,7 @@ uint32_t avnd_comp_clc_restart_termsucc_
                m_GET_TIME_STAMP(comp->clc_info.inst_cmd_ts);
                m_AVND_SEND_CKPT_UPDT_ASYNC_UPDT(cb, comp, 
AVND_CKPT_COMP_INST_CMD_TS);
        }
-
+done:
        TRACE_LEAVE();
        return rc;
 }
@@ -2494,12 +2511,6 @@ uint32_t avnd_comp_clc_cmd_execute(AVND_
 
        TRACE_ENTER2("'%s':CLC CLI command 
type:'%s'",comp->name.value,clc_cmd_type[cmd_type]);
 
-       /* Refresh the component configuration, it may have changed */
-       if (!m_AVND_IS_SHUTTING_DOWN(cb) && (avnd_comp_config_reinit(comp) != 
0)) {
-               rc = NCSCC_RC_FAILURE;
-               goto err;
-       }
-
        /* the allocated memory is normally freed in comp_clc_resp_callback */
        clc_evt = (AVND_CLC_EVT *)calloc(1, sizeof(AVND_CLC_EVT));
        memcpy(&clc_evt->comp_name, &comp->name, sizeof(SaNameT));

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to