osaf/libs/agents/saf/cpa/cpa_api.c       |  2 +-
 osaf/libs/agents/saf/cpa/cpa_mds.c       |  4 ++--
 osaf/libs/common/cpsv/include/cpsv_evt.h |  1 +
 osaf/services/saf/cpsv/cpnd/cpnd_evt.c   |  1 +
 4 files changed, 5 insertions(+), 3 deletions(-)


This issue occurs only in case of  32bit CPA application communicating to 64bit 
CPND.

If 64bit CPA application communicating to 64bit CPND , mds_enc_flat is used
and in case of  32bit CPA application communicating to 64bit CPND  mds_enc is 
used.

The   EDU (cpsv_edu.c)  is getting commonly used by   cpa--->cpnd
and cpnd----->cpd  & cpd----->cpnd .

Currently in cpa_mds_enc() the  default  peer version  ( edu_hdl->to_version)
is getting send to EDU functions  , instead of correct  peer version 
(o_msg_fmt_ver) ,
because of that  in   EDU functions the  attribute is NOT encoded
 and sent form32bit CPA application, but 64bit CPND is trying  to decode the  
attribute
that is why we are seeing segmentation fault in CPND.

Changed  m_NCS_EDU_EXEC  to  m_NCS_EDU_VER_EXEC to update correct peer 
msg_fmt_ver
of  edu_hdl In cpa_mds_enc().

diff --git a/osaf/libs/agents/saf/cpa/cpa_api.c 
b/osaf/libs/agents/saf/cpa/cpa_api.c
--- a/osaf/libs/agents/saf/cpa/cpa_api.c
+++ b/osaf/libs/agents/saf/cpa/cpa_api.c
@@ -1758,7 +1758,7 @@ SaAisErrorT saCkptCheckpointRetentionDur
        evt.type = CPSV_EVT_TYPE_CPND;
        evt.info.cpnd.type = CPND_EVT_A2ND_CKPT_RDSET;
        evt.info.cpnd.info.rdsetReq.ckpt_id = lc_node->gbl_ckpt_hdl;
-
+       evt.info.cpnd.info.rdsetReq.type = CPSV_CKPT_RDSET_INFO;
        /* Convert the retentionDuration from saTimeT to millisecs */
 /*   retentionDuration = 
m_CPSV_CONVERT_SATIME_TEN_MILLI_SEC(retentionDuration); */
        evt.info.cpnd.info.rdsetReq.reten_time = retentionDuration;
diff --git a/osaf/libs/agents/saf/cpa/cpa_mds.c 
b/osaf/libs/agents/saf/cpa/cpa_mds.c
--- a/osaf/libs/agents/saf/cpa/cpa_mds.c
+++ b/osaf/libs/agents/saf/cpa/cpa_mds.c
@@ -642,8 +642,8 @@ static uint32_t cpa_mds_enc(CPA_CB *cb, 
                 }
          }
       }  /* For all other cases call EDU othen than Write/Read API's */
-               rc = m_NCS_EDU_EXEC(&cb->edu_hdl, FUNC_NAME(CPSV_EVT),
-                                   enc_info->io_uba, EDP_OP_TYPE_ENC, pevt, 
&ederror);
+               rc = m_NCS_EDU_VER_EXEC(&cb->edu_hdl, FUNC_NAME(CPSV_EVT),
+                               enc_info->io_uba, EDP_OP_TYPE_ENC, pevt, 
&ederror, enc_info->o_msg_fmt_ver);
                TRACE_LEAVE();
                return rc;
        } else {
diff --git a/osaf/libs/common/cpsv/include/cpsv_evt.h 
b/osaf/libs/common/cpsv/include/cpsv_evt.h
--- a/osaf/libs/common/cpsv/include/cpsv_evt.h
+++ b/osaf/libs/common/cpsv/include/cpsv_evt.h
@@ -328,6 +328,7 @@ typedef struct cpsv_a2nd_rdset {
 /* Delete SaCkptHandleT                client_hdl; */
        SaCkptCheckpointHandleT ckpt_id;
        SaTimeT reten_time;
+       uint32_t type;
 } CPSV_A2ND_RDSET;
 
 typedef struct cpsv_a2nd_active_rep_set {
diff --git a/osaf/services/saf/cpsv/cpnd/cpnd_evt.c 
b/osaf/services/saf/cpsv/cpnd/cpnd_evt.c
--- a/osaf/services/saf/cpsv/cpnd/cpnd_evt.c
+++ b/osaf/services/saf/cpsv/cpnd/cpnd_evt.c
@@ -1425,6 +1425,7 @@ static uint32_t cpnd_evt_proc_ckpt_rdset
        send_evt.info.cpd.type = CPD_EVT_ND2D_CKPT_RDSET;
        send_evt.info.cpd.info.rd_set.ckpt_id = evt->info.rdsetReq.ckpt_id;
        send_evt.info.cpd.info.rd_set.reten_time = 
evt->info.rdsetReq.reten_time;
+       send_evt.info.cpd.info.rd_set.type = evt->info.rdsetReq.type;
 
        rc = cpnd_mds_msg_sync_send(cb, NCSMDS_SVC_ID_CPD, cb->cpd_mdest_id, 
&send_evt, &out_evt, CPSV_WAIT_TIME);
 

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to