osaf/services/saf/amf/amfd/ckpt_dec.cc        |  455 +++++++++++--------------
 osaf/services/saf/amf/amfd/ckpt_edu.cc        |   53 ---
 osaf/services/saf/amf/amfd/include/ckpt.h     |    4 +
 osaf/services/saf/amf/amfd/include/ckpt_edu.h |    3 -
 4 files changed, 203 insertions(+), 312 deletions(-)


Simplify decode of AVD_COMP

diff --git a/osaf/services/saf/amf/amfd/ckpt_dec.cc 
b/osaf/services/saf/amf/amfd/ckpt_dec.cc
--- a/osaf/services/saf/amf/amfd/ckpt_dec.cc
+++ b/osaf/services/saf/amf/amfd/ckpt_dec.cc
@@ -665,6 +665,29 @@ static uint32_t dec_siass(AVD_CL_CB *cb,
 }
 
 /****************************************************************************\
+ * Function: decode_comp
+ *
+ * Purpose:  Decode entire AVD_COMP data.
+ *
+ * Input: ub   - USRBUF work space for encode/decode.
+ *        comp - AVD_COMP class to be decoded.
+ *
+ * Returns: void.
+ *
+ * NOTES:
+ *
+ *
+\**************************************************************************/
+void decode_comp(NCS_UBAID *ub, AVD_COMP *comp) {
+  osaf_decode_sanamet(ub, &comp->comp_info.name);
+  osaf_decode_uint32(ub, 
reinterpret_cast<uint32_t*>(&comp->saAmfCompOperState));
+  osaf_decode_uint32(ub, 
reinterpret_cast<uint32_t*>(&comp->saAmfCompReadinessState));
+  osaf_decode_uint32(ub, 
reinterpret_cast<uint32_t*>(&comp->saAmfCompPresenceState));
+  osaf_decode_uint32(ub, &comp->saAmfCompRestartCount);
+  osaf_decode_sanamet(ub, &comp->saAmfCompCurrProxyName);
+}
+
+/****************************************************************************\
  * Function: dec_comp_config
  *
  * Purpose:  Decode entire AVD_COMP data..
@@ -678,54 +701,38 @@ static uint32_t dec_siass(AVD_CL_CB *cb,
  *
  * 
 \**************************************************************************/
-static uint32_t dec_comp_config(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec)
-{
-       uint32_t status = NCSCC_RC_SUCCESS;
-       AVD_COMP *comp_ptr;
-       AVD_COMP dec_comp;
-       EDU_ERR ederror = static_cast<EDU_ERR>(0);
-
-       TRACE_ENTER2("i_action '%u'", dec->i_action);
-       comp_ptr = &dec_comp;
-
-       /* 
-        * Check for the action type (whether it is add, rmv or update) and act
-        * accordingly. If it is add then create new element, if it is update
-        * request then just update data structure, and if it is remove then 
-        * remove entry from the list.
-        */
-       switch (dec->i_action) {
-       case NCS_MBCSV_ACT_ADD:
-       case NCS_MBCSV_ACT_UPDATE:
-               /* Send entire data */
-               status = m_NCS_EDU_VER_EXEC(&cb->edu_hdl, 
avsv_edp_ckpt_msg_comp,
-                       &dec->i_uba, EDP_OP_TYPE_DEC, (AVD_COMP **)&comp_ptr, 
&ederror,
-                       dec->i_peer_version);
-               break;
-
-       case NCS_MBCSV_ACT_RMV:
-               /* Send only key information */
-               status = ncs_edu_exec(&cb->edu_hdl, avsv_edp_ckpt_msg_comp,
-                       &dec->i_uba, EDP_OP_TYPE_DEC, (AVD_COMP **)&comp_ptr, 
&ederror, 1, 1);
-               break;
-
-       default:
-               osafassert(0);
-       }
-
-       if (status != NCSCC_RC_SUCCESS) {
-               LOG_ER("%s: decode failed, ederror=%u", __FUNCTION__, ederror);
-               return status;
-       }
-
-       status = avd_ckpt_comp(cb, comp_ptr, dec->i_action);
-
-       /* If update is successful, update async update count */
-       if (NCSCC_RC_SUCCESS == status)
-               cb->async_updt_cnt.comp_updt++;
-
-       TRACE_LEAVE2("status '%u'", status);
-       return status;
+static uint32_t dec_comp_config(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec) {
+  uint32_t status = NCSCC_RC_SUCCESS;
+  AVD_COMP comp;
+
+  TRACE_ENTER2("i_action '%u'", dec->i_action);
+
+  /*
+   * Check for the action type (whether it is add, rmv or update) and act
+   * accordingly. If it is add then create new element, if it is update
+   * request then just update data structure, and if it is remove then
+   * remove entry from the list.
+   */
+  switch (dec->i_action) {
+    case NCS_MBCSV_ACT_ADD:
+    case NCS_MBCSV_ACT_UPDATE:
+      decode_comp(&dec->i_uba, &comp);
+      break;
+    case NCS_MBCSV_ACT_RMV:
+      osaf_decode_sanamet(&dec->i_uba, &comp.comp_info.name);
+      break;
+    default:
+      osafassert(0);
+  }
+
+  status = avd_ckpt_comp(cb, &comp, dec->i_action);
+
+  /* If update is successful, update async update count */
+  if (NCSCC_RC_SUCCESS == status)
+    cb->async_updt_cnt.comp_updt++;
+
+  TRACE_LEAVE();
+  return status;
 }
 
 /****************************************************************************\
@@ -1858,37 +1865,28 @@ static uint32_t dec_si_alarm_sent(AVD_CL
  *
  * 
 \**************************************************************************/
-static uint32_t dec_comp_proxy_comp_name(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec)
-{
-       uint32_t status = NCSCC_RC_SUCCESS;
-       AVD_COMP *comp_ptr;
-       AVD_COMP dec_comp;
-       EDU_ERR ederror = static_cast<EDU_ERR>(0);
-       AVD_COMP *comp_struct;
-
-       TRACE_ENTER();
-
-       comp_ptr = &dec_comp;
-
-       /* 
-        * Action in this case is just to update.
-        */
-       status = ncs_edu_exec(&cb->edu_hdl, avsv_edp_ckpt_msg_comp,
-             &dec->i_uba, EDP_OP_TYPE_DEC, (AVD_COMP **)&comp_ptr, &ederror, 
2, 1, 6);
-
-       if (status != NCSCC_RC_SUCCESS)
-               osafassert(0);
-
-       if (nullptr == (comp_struct = 
comp_db->find(Amf::to_string(&comp_ptr->comp_info.name))))
-               osafassert(0);
-
-       /* Update the fields received in this checkpoint message */
-       comp_struct->saAmfCompCurrProxyName = comp_ptr->saAmfCompCurrProxyName;
-
-       cb->async_updt_cnt.comp_updt++;
-
-       TRACE_LEAVE2("status '%u'", status);
-       return status;
+static uint32_t dec_comp_proxy_comp_name(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec) 
{
+  AVD_COMP comp;
+  AVD_COMP *comp_struct {};
+
+  TRACE_ENTER();
+
+  /*
+   * Action in this case is just to update.
+   */
+  osaf_decode_sanamet(&dec->i_uba, &comp.comp_info.name);
+  osaf_decode_sanamet(&dec->i_uba, &comp.saAmfCompCurrProxyName);
+
+  if (nullptr == (comp_struct = 
comp_db->find(Amf::to_string(&comp.comp_info.name))))
+    osafassert(0);
+
+  /* Update the fields received in this checkpoint message */
+  comp_struct->saAmfCompCurrProxyName = comp.saAmfCompCurrProxyName;
+
+  cb->async_updt_cnt.comp_updt++;
+
+  TRACE_LEAVE();
+  return NCSCC_RC_SUCCESS;
 }
 
 /****************************************************************************\
@@ -1905,40 +1903,29 @@ static uint32_t dec_comp_proxy_comp_name
  *
  * 
 \**************************************************************************/
-static uint32_t dec_comp_oper_state(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec)
-{
-       uint32_t status = NCSCC_RC_SUCCESS;
-       AVD_COMP *comp_ptr;
-       AVD_COMP dec_comp;
-       EDU_ERR ederror = static_cast<EDU_ERR>(0);
-       AVD_COMP *comp_struct;
-
-       TRACE_ENTER();
-
-       comp_ptr = &dec_comp;
-
-       /* 
-        * Action in this case is just to update.
-        */
-       status = ncs_edu_exec(&cb->edu_hdl, avsv_edp_ckpt_msg_comp,
-               &dec->i_uba, EDP_OP_TYPE_DEC, (AVD_COMP **)&comp_ptr, &ederror, 
2, 1, 2);
-
-       if (status != NCSCC_RC_SUCCESS) {
-               LOG_ER("%s: decode failed, ederror=%u", __FUNCTION__, ederror);
-               return status;
-       }
-
-       comp_struct = avd_comp_get_or_create(&comp_ptr->comp_info.name);
-
-       /* Update the fields received in this checkpoint message */
-       comp_struct->saAmfCompOperState = comp_ptr->saAmfCompOperState;
-       avd_saImmOiRtObjectUpdate(&comp_ptr->comp_info.name, 
"saAmfCompOperState",
-               SA_IMM_ATTR_SAUINT32T, &comp_ptr->saAmfCompOperState);
-
-       cb->async_updt_cnt.comp_updt++;
-
-       TRACE_LEAVE2("status '%u'", status);
-       return status;
+static uint32_t dec_comp_oper_state(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec) {
+  AVD_COMP comp;
+  AVD_COMP *comp_struct {};
+
+  TRACE_ENTER();
+
+  /*
+   * Action in this case is just to update.
+   */
+  osaf_decode_sanamet(&dec->i_uba, &comp.comp_info.name);
+  osaf_decode_uint32(&dec->i_uba, reinterpret_cast<uint32_t*> 
(&comp.saAmfCompOperState));
+
+  comp_struct = avd_comp_get_or_create(&comp.comp_info.name);
+
+  /* Update the fields received in this checkpoint message */
+  comp_struct->saAmfCompOperState = comp.saAmfCompOperState;
+  avd_saImmOiRtObjectUpdate(&comp_struct->comp_info.name, "saAmfCompOperState",
+                            SA_IMM_ATTR_SAUINT32T, 
&comp_struct->saAmfCompOperState);
+
+  cb->async_updt_cnt.comp_updt++;
+
+  TRACE_LEAVE();
+  return NCSCC_RC_SUCCESS;
 }
 
 /****************************************************************************\
@@ -1955,43 +1942,32 @@ static uint32_t dec_comp_oper_state(AVD_
  *
  * 
 \**************************************************************************/
-static uint32_t dec_comp_readiness_state(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec)
-{
-       uint32_t status = NCSCC_RC_SUCCESS;
-       AVD_COMP *comp_ptr;
-       AVD_COMP dec_comp;
-       EDU_ERR ederror = static_cast<EDU_ERR>(0);
-       AVD_COMP *comp_struct;
-
-       TRACE_ENTER();
-
-       comp_ptr = &dec_comp;
-
-       /* 
-        * Action in this case is just to update.
-        */
-       status = ncs_edu_exec(&cb->edu_hdl, avsv_edp_ckpt_msg_comp,
-               &dec->i_uba, EDP_OP_TYPE_DEC, (AVD_COMP **)&comp_ptr, &ederror, 
2, 1, 3);
-
-       if (status != NCSCC_RC_SUCCESS) {
-               LOG_ER("%s: decode failed, ederror=%u", __FUNCTION__, ederror);
-               return status;
-       }
-
-       if (nullptr == (comp_struct = 
comp_db->find(Amf::to_string(&comp_ptr->comp_info.name)))) {
-               LOG_ER("%s: comp not found, %s", __FUNCTION__, 
comp_ptr->comp_info.name.value);
-               return NCSCC_RC_FAILURE;
-       }
-
-       /* Update the fields received in this checkpoint message */
-       comp_struct->saAmfCompReadinessState = 
comp_ptr->saAmfCompReadinessState;
-
-       cb->async_updt_cnt.comp_updt++;
-
-       avd_saImmOiRtObjectUpdate(&comp_struct->comp_info.name, 
"saAmfCompReadinessState",
-               SA_IMM_ATTR_SAUINT32T, &comp_struct->saAmfCompReadinessState);
-       TRACE_LEAVE2("status '%u'", status);
-       return status;
+static uint32_t dec_comp_readiness_state(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec) 
{
+  AVD_COMP comp;
+  AVD_COMP *comp_struct {};
+
+  TRACE_ENTER();
+
+  /*
+   * Action in this case is just to update.
+   */
+  osaf_decode_sanamet(&dec->i_uba, &comp.comp_info.name);
+  osaf_decode_uint32(&dec->i_uba, reinterpret_cast<uint32_t*> 
(&comp.saAmfCompReadinessState));
+
+  if (nullptr == (comp_struct = 
comp_db->find(Amf::to_string(&comp.comp_info.name)))) {
+    LOG_ER("%s: comp not found, %s", __FUNCTION__, comp.comp_info.name.value);
+    return NCSCC_RC_FAILURE;
+  }
+
+  /* Update the fields received in this checkpoint message */
+  comp_struct->saAmfCompReadinessState = comp.saAmfCompReadinessState;
+
+  cb->async_updt_cnt.comp_updt++;
+
+  avd_saImmOiRtObjectUpdate(&comp_struct->comp_info.name, 
"saAmfCompReadinessState",
+                            SA_IMM_ATTR_SAUINT32T, 
&comp_struct->saAmfCompReadinessState);
+  TRACE_LEAVE();
+  return NCSCC_RC_SUCCESS;
 }
 
 /****************************************************************************\
@@ -2008,43 +1984,32 @@ static uint32_t dec_comp_readiness_state
  *
  * 
 \**************************************************************************/
-static uint32_t dec_comp_pres_state(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec)
-{
-       uint32_t status = NCSCC_RC_SUCCESS;
-       AVD_COMP *comp_ptr;
-       AVD_COMP dec_comp;
-       EDU_ERR ederror = static_cast<EDU_ERR>(0);
-       AVD_COMP *comp_struct;
-
-       TRACE_ENTER();
-
-       comp_ptr = &dec_comp;
-
-       /* 
-        * Action in this case is just to update.
-        */
-       status = ncs_edu_exec(&cb->edu_hdl, avsv_edp_ckpt_msg_comp,
-               &dec->i_uba, EDP_OP_TYPE_DEC, (AVD_COMP **)&comp_ptr, &ederror, 
2, 1, 4);
-
-       if (status != NCSCC_RC_SUCCESS) {
-               LOG_ER("%s: decode failed, ederror=%u", __FUNCTION__, ederror);
-               return status;
-       }
-
-       if (nullptr == (comp_struct = 
comp_db->find(Amf::to_string(&comp_ptr->comp_info.name)))) {
-               LOG_ER("%s: comp not found, %s", __FUNCTION__, 
comp_ptr->comp_info.name.value);
-               return NCSCC_RC_FAILURE;
-       }
-
-       /* Update the fields received in this checkpoint message */
-       comp_struct->saAmfCompPresenceState = comp_ptr->saAmfCompPresenceState;
-
-       cb->async_updt_cnt.comp_updt++;
-       avd_saImmOiRtObjectUpdate(&comp_struct->comp_info.name, 
"saAmfCompPresenceState",
-               SA_IMM_ATTR_SAUINT32T, &comp_struct->saAmfCompPresenceState);
-
-       TRACE_LEAVE2("status '%u'", status);
-       return status;
+static uint32_t dec_comp_pres_state(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec) {
+  AVD_COMP comp;
+  AVD_COMP *comp_struct {};
+
+  TRACE_ENTER();
+
+  /*
+   * Action in this case is just to update.
+   */
+  osaf_decode_sanamet(&dec->i_uba, &comp.comp_info.name);
+  osaf_decode_uint32(&dec->i_uba, reinterpret_cast<uint32_t*> 
(&comp.saAmfCompPresenceState));
+
+  if (nullptr == (comp_struct = 
comp_db->find(Amf::to_string(&comp.comp_info.name)))) {
+    LOG_ER("%s: comp not found, %s", __FUNCTION__, comp.comp_info.name.value);
+    return NCSCC_RC_FAILURE;
+  }
+
+  /* Update the fields received in this checkpoint message */
+  comp_struct->saAmfCompPresenceState = comp.saAmfCompPresenceState;
+
+  cb->async_updt_cnt.comp_updt++;
+  avd_saImmOiRtObjectUpdate(&comp_struct->comp_info.name, 
"saAmfCompPresenceState",
+                            SA_IMM_ATTR_SAUINT32T, 
&comp_struct->saAmfCompPresenceState);
+
+  TRACE_LEAVE();
+  return NCSCC_RC_SUCCESS;
 }
 
 /****************************************************************************\
@@ -2061,41 +2026,30 @@ static uint32_t dec_comp_pres_state(AVD_
  *
  * 
 \**************************************************************************/
-static uint32_t dec_comp_restart_count(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec)
-{
-       uint32_t status = NCSCC_RC_SUCCESS;
-       AVD_COMP *comp_ptr;
-       AVD_COMP dec_comp;
-       EDU_ERR ederror = static_cast<EDU_ERR>(0);
-       AVD_COMP *comp_struct;
-
-       TRACE_ENTER();
-
-       comp_ptr = &dec_comp;
-
-       /* 
-        * Action in this case is just to update.
-        */
-       status = ncs_edu_exec(&cb->edu_hdl, avsv_edp_ckpt_msg_comp,
-                             &dec->i_uba, EDP_OP_TYPE_DEC, (AVD_COMP 
**)&comp_ptr, &ederror, 2, 1, 5);
-
-       if (status != NCSCC_RC_SUCCESS) {
-               LOG_ER("%s: decode failed, ederror=%u", __FUNCTION__, ederror);
-               return status;
-       }
-
-       if (nullptr == (comp_struct = 
comp_db->find(Amf::to_string(&comp_ptr->comp_info.name)))) {
-               LOG_ER("%s: comp not found, %s", __FUNCTION__, 
comp_ptr->comp_info.name.value);
-               return NCSCC_RC_FAILURE;
-       }
-
-       /* Update the fields received in this checkpoint message */
-       comp_struct->saAmfCompRestartCount = comp_ptr->saAmfCompRestartCount;
-
-       cb->async_updt_cnt.comp_updt++;
-
-       TRACE_LEAVE2("status '%u'", status);
-       return status;
+static uint32_t dec_comp_restart_count(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec) {
+  AVD_COMP comp;
+  AVD_COMP *comp_struct{};
+
+  TRACE_ENTER();
+
+  /*
+   * Action in this case is just to update.
+   */
+  osaf_decode_sanamet(&dec->i_uba, &comp.comp_info.name);
+  osaf_decode_uint32(&dec->i_uba, &comp.saAmfCompRestartCount);
+
+  if (nullptr == (comp_struct = 
comp_db->find(Amf::to_string(&comp.comp_info.name)))) {
+    LOG_ER("%s: comp not found, %s", __FUNCTION__, comp.comp_info.name.value);
+    return NCSCC_RC_FAILURE;
+  }
+
+  /* Update the fields received in this checkpoint message */
+  comp_struct->saAmfCompRestartCount = comp.saAmfCompRestartCount;
+
+  cb->async_updt_cnt.comp_updt++;
+
+  TRACE_LEAVE();
+  return NCSCC_RC_SUCCESS;
 }
 
 /****************************************************************************\
@@ -2566,40 +2520,29 @@ static uint32_t dec_cs_siass(AVD_CL_CB *
  *
  * 
 \**************************************************************************/
-static uint32_t dec_cs_comp_config(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec, 
uint32_t num_of_obj)
-{
-       uint32_t status = NCSCC_RC_SUCCESS;
-       AVD_COMP *comp_ptr;
-       AVD_COMP dec_comp;
-       EDU_ERR ederror = static_cast<EDU_ERR>(0);
-       uint32_t count = 0;
-
-       TRACE_ENTER();
-
-       comp_ptr = &dec_comp;
-       /* 
-        * Walk through the entire list and send the entire list data.
-        */
-       for (count = 0; count < num_of_obj; count++) {
-               status = m_NCS_EDU_VER_EXEC(&cb->edu_hdl, 
avsv_edp_ckpt_msg_comp,
-                                           &dec->i_uba, EDP_OP_TYPE_DEC, 
(AVD_COMP **)&comp_ptr, &ederror,
-                                           dec->i_peer_version);
-
-               if (status != NCSCC_RC_SUCCESS) {
-                       LOG_ER("%s: decode failed, ederror=%u", __FUNCTION__, 
ederror);
-                       return status;
-               }
-
-               status = avd_ckpt_comp(cb, comp_ptr, dec->i_action);
-
-               if (status != NCSCC_RC_SUCCESS) {
-                       return NCSCC_RC_FAILURE;
-               }
-
-       }
-
-       TRACE_LEAVE2("status '%u'", status);
-       return status;
+static uint32_t dec_cs_comp_config(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec, 
uint32_t num_of_obj) {
+  uint32_t status = NCSCC_RC_SUCCESS;
+  AVD_COMP comp;
+  uint32_t count = 0;
+
+  TRACE_ENTER();
+
+  /*
+   * Walk through the entire list and send the entire list data.
+   */
+  for (count = 0; count < num_of_obj; count++) {
+    decode_comp(&dec->i_uba, &comp);
+
+    status = avd_ckpt_comp(cb, &comp, dec->i_action);
+
+    if (status != NCSCC_RC_SUCCESS) {
+      return NCSCC_RC_FAILURE;
+    }
+
+  }
+
+  TRACE_LEAVE2("status '%u'", status);
+  return status;
 }
 
 /****************************************************************************\
diff --git a/osaf/services/saf/amf/amfd/ckpt_edu.cc 
b/osaf/services/saf/amf/amfd/ckpt_edu.cc
--- a/osaf/services/saf/amf/amfd/ckpt_edu.cc
+++ b/osaf/services/saf/amf/amfd/ckpt_edu.cc
@@ -61,10 +61,6 @@ uint32_t avd_compile_ckpt_edp(AVD_CL_CB 
        if (rc != NCSCC_RC_SUCCESS)
                goto error;
 
-       rc = m_NCS_EDU_COMPILE_EDP(&cb->edu_hdl, avsv_edp_ckpt_msg_comp, &err);
-       if (rc != NCSCC_RC_SUCCESS)
-               goto error;
-
        rc = m_NCS_EDU_COMPILE_EDP(&cb->edu_hdl, avsv_edp_ckpt_msg_siass, &err);
        if (rc != NCSCC_RC_SUCCESS)
                goto error;
@@ -247,55 +243,6 @@ uint32_t avsv_edp_ckpt_msg_node(EDU_HDL 
 
 /*****************************************************************************
 
-  PROCEDURE NAME:   avsv_edp_ckpt_msg_comp
-
-  DESCRIPTION:      EDU program handler for "AVD_COMP" data. This 
-                    function is invoked by EDU for performing encode/decode 
-                    operation on "AVD_COMP" data.
-
-  RETURNS:          NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE
-
-*****************************************************************************/
-uint32_t avsv_edp_ckpt_msg_comp(EDU_HDL *hdl, EDU_TKN *edu_tkn,
-                            NCSCONTEXT ptr, uint32_t *ptr_data_len, 
EDU_BUF_ENV *buf_env, EDP_OP_TYPE op, EDU_ERR *o_err)
-{
-       uint32_t rc = NCSCC_RC_SUCCESS;
-       AVD_COMP *struct_ptr = nullptr, **d_ptr = nullptr;
-
-       EDU_INST_SET avsv_ckpt_msg_comp_rules[] = {
-               {EDU_START, avsv_edp_ckpt_msg_comp, 0, 0, 0, sizeof(AVD_COMP), 
0, nullptr},
-
-               {EDU_EXEC, ncs_edp_sanamet, 0, 0, 0, (long)&((AVD_COMP 
*)0)->comp_info.name, 0, nullptr},
-               {EDU_EXEC, ncs_edp_uns32, 0, 0, 0, (long)&((AVD_COMP 
*)0)->saAmfCompOperState, 0, nullptr},
-               {EDU_EXEC, ncs_edp_uns32, 0, 0, 0, (long)&((AVD_COMP 
*)0)->saAmfCompReadinessState, 0, nullptr},
-               {EDU_EXEC, ncs_edp_uns32, 0, 0, 0, (long)&((AVD_COMP 
*)0)->saAmfCompPresenceState, 0, nullptr},
-               {EDU_EXEC, ncs_edp_uns32, 0, 0, 0, (long)&((AVD_COMP 
*)0)->saAmfCompRestartCount, 0, nullptr},
-               {EDU_EXEC, ncs_edp_sanamet, 0, 0, 0, (long)&((AVD_COMP 
*)0)->saAmfCompCurrProxyName, 0, nullptr},
-
-               {EDU_END, 0, 0, 0, 0, 0, 0, nullptr},
-       };
-
-       if (op == EDP_OP_TYPE_ENC) {
-               struct_ptr = (AVD_COMP *)ptr;
-       } else if (op == EDP_OP_TYPE_DEC) {
-               d_ptr = (AVD_COMP **)ptr;
-               if (*d_ptr == nullptr) {
-                       *o_err = EDU_ERR_MEM_FAIL;
-                       return NCSCC_RC_FAILURE;
-               }
-               memset(*d_ptr, '\0', sizeof(AVD_COMP));
-               struct_ptr = *d_ptr;
-       } else {
-               struct_ptr = static_cast<AVD_COMP*>(ptr);
-       }
-
-       rc = m_NCS_EDU_RUN_RULES(hdl, edu_tkn, avsv_ckpt_msg_comp_rules, 
struct_ptr, ptr_data_len, buf_env, op, o_err);
-
-       return rc;
-}
-
-/*****************************************************************************
-
   PROCEDURE NAME:   avsv_edp_ckpt_msg_siass
 
   DESCRIPTION:      EDU program handler for "AVD_SU_SI_REL" data. This 
diff --git a/osaf/services/saf/amf/amfd/include/ckpt.h 
b/osaf/services/saf/amf/amfd/include/ckpt.h
--- a/osaf/services/saf/amf/amfd/include/ckpt.h
+++ b/osaf/services/saf/amf/amfd/include/ckpt.h
@@ -48,6 +48,7 @@
 struct avd_evt_tag;
 struct cl_cb_tag;
 class AVD_APP;
+class AVD_COMP;
 /* 
  * SU SI Relationship checkpoint encode/decode message structure..
  */
@@ -154,4 +155,7 @@ uint32_t avd_dec_data_req(struct cl_cb_t
 uint32_t avd_avnd_send_role_change(struct cl_cb_tag *cb, NODE_ID, uint32_t 
role);
 void encode_app(NCS_UBAID *ub, const AVD_APP *app);
 void decode_app(NCS_UBAID *ub, AVD_APP *app);
+void encode_comp(NCS_UBAID *ub, const AVD_COMP *comp);
+void decode_comp(NCS_UBAID *ub, AVD_COMP *comp);
+
 #endif
diff --git a/osaf/services/saf/amf/amfd/include/ckpt_edu.h 
b/osaf/services/saf/amf/amfd/include/ckpt_edu.h
--- a/osaf/services/saf/amf/amfd/include/ckpt_edu.h
+++ b/osaf/services/saf/amf/amfd/include/ckpt_edu.h
@@ -48,9 +48,6 @@ uint32_t avsv_edp_ckpt_msg_node(EDU_HDL 
 uint32_t avsv_edp_ckpt_msg_si(EDU_HDL *hdl, EDU_TKN *edu_tkn,
                                    NCSCONTEXT ptr, uint32_t *ptr_data_len,
                                    EDU_BUF_ENV *buf_env, EDP_OP_TYPE op, 
EDU_ERR *o_err);
-uint32_t avsv_edp_ckpt_msg_comp(EDU_HDL *hdl, EDU_TKN *edu_tkn,
-                                     NCSCONTEXT ptr, uint32_t *ptr_data_len,
-                                     EDU_BUF_ENV *buf_env, EDP_OP_TYPE op, 
EDU_ERR *o_err);
 uint32_t avsv_edp_ckpt_msg_siass(EDU_HDL *hdl, EDU_TKN *edu_tkn,
                                           NCSCONTEXT ptr, uint32_t 
*ptr_data_len,
                                           EDU_BUF_ENV *buf_env, EDP_OP_TYPE 
op, EDU_ERR *o_err);

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

Reply via email to