osaf/libs/common/mqsv/include/mqa_db.h | 4 +++- osaf/libs/common/mqsv/include/mqsv_common.h | 2 +- osaf/libs/common/mqsv/mqsv_common.c | 9 ++------- osaf/services/saf/mqsv/mqd/mqd_mds.c | 3 ++- 4 files changed, 8 insertions(+), 10 deletions(-)
Use the new support function GetSlotSubslotIdFromNodeId() to extract a 32-bit integer containing the slot ID and subslot ID from a Node ID. diff --git a/osaf/libs/common/mqsv/include/mqa_db.h b/osaf/libs/common/mqsv/include/mqa_db.h --- a/osaf/libs/common/mqsv/include/mqa_db.h +++ b/osaf/libs/common/mqsv/include/mqa_db.h @@ -30,10 +30,12 @@ #ifndef MQA_DB_H #define MQA_DB_H +#include "ncsgl_defs.h" + extern uint32_t gl_mqa_hdl; /*Maximum Nodes in the cluster */ -#define MQA_MAX_NODES NCS_MAX_SLOTS +#define MQA_MAX_NODES kMaxSlotsSubslots typedef unsigned short SVC_SUBPART_VER; /********************Service Sub part Versions*********************************/ diff --git a/osaf/libs/common/mqsv/include/mqsv_common.h b/osaf/libs/common/mqsv/include/mqsv_common.h --- a/osaf/libs/common/mqsv/include/mqsv_common.h +++ b/osaf/libs/common/mqsv/include/mqsv_common.h @@ -86,7 +86,7 @@ uint32_t machineEndianness(void); uint32_t mqsv_listenerq_msg_send(SaMsgQueueHandleT listenerhandle); -NCS_PHY_SLOT_ID mqsv_get_phy_slot_id(MDS_DEST dest); +SlotSubslotId mqsv_get_phy_slot_id(MDS_DEST dest); typedef unsigned int MSG_FRMT_VER; #define m_MQSV_CONVERT_SATIME_TEN_MILLI_SEC(t) (t)/(10000000) /* 10^7 */ diff --git a/osaf/libs/common/mqsv/mqsv_common.c b/osaf/libs/common/mqsv/mqsv_common.c --- a/osaf/libs/common/mqsv/mqsv_common.c +++ b/osaf/libs/common/mqsv/mqsv_common.c @@ -117,12 +117,7 @@ uint32_t mqsv_listenerq_msg_send(SaMsgQu *************************************************************************************/ -NCS_PHY_SLOT_ID mqsv_get_phy_slot_id(MDS_DEST dest) +SlotSubslotId mqsv_get_phy_slot_id(MDS_DEST dest) { - NCS_PHY_SLOT_ID phy_slot; - NCS_SUB_SLOT_ID sub_slot; - - m_NCS_GET_PHYINFO_FROM_NODE_ID(m_NCS_NODE_ID_FROM_MDS_DEST(dest), NULL, &phy_slot, &sub_slot); - - return ((sub_slot * NCS_SUB_SLOT_MAX) + phy_slot); + return GetSlotSubslotIdFromNodeId(m_NCS_NODE_ID_FROM_MDS_DEST(dest)); } diff --git a/osaf/services/saf/mqsv/mqd/mqd_mds.c b/osaf/services/saf/mqsv/mqd/mqd_mds.c --- a/osaf/services/saf/mqsv/mqd/mqd_mds.c +++ b/osaf/services/saf/mqsv/mqd/mqd_mds.c @@ -567,7 +567,8 @@ static void mqd_mds_svc_evt(MQD_CB *pMqd case NCSMDS_UP: { if (svc->i_svc_id == NCSMDS_SVC_ID_MQND) { - uint16_t to_dest_slotid, o_msg_fmt_ver; + SlotSubslotId to_dest_slotid; + uint16_t o_msg_fmt_ver; to_dest_slotid = mqsv_get_phy_slot_id(svc->i_dest); o_msg_fmt_ver = m_NCS_ENC_MSG_FMT_GET(svc->i_rem_svc_pvt_ver, ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel