Multiple "CLMSV_CLMS_TO_CLMA_IS_MEMBER_MSG" were not being dispatched.
Dispatch later calls detroy. Fixed that.
Also fixed few lint errors in the file
---
src/clm/agent/clma_mds.cc | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/src/clm/agent/clma_mds.cc b/src/clm/agent/clma_mds.cc
index 3e7cb7db2..60e9118b3 100644
--- a/src/clm/agent/clma_mds.cc
+++ b/src/clm/agent/clma_mds.cc
@@ -871,14 +871,21 @@ uint32_t clma_clms_msg_proc(clma_cb_t *cb, CLMSV_MSG
*clmsv_msg,
(int)clmsv_msg->info.is_member_info.client_id);
/** Lookup the hdl rec by client_id **/
if (nullptr == (clma_hdl_rec = clma_find_hdl_rec_by_client_id(
- cb, clmsv_msg->info.is_member_info.client_id))) {
- TRACE("client_id not found");
- TRACE_LEAVE();
- return NCSCC_RC_FAILURE;
+ cb, clmsv_msg->info.is_member_info.client_id))) {
+ TRACE("client_id not found");
+ TRACE_LEAVE();
+ return NCSCC_RC_FAILURE;
}
clma_hdl_rec->is_member = clmsv_msg->info.is_member_info.is_member;
clma_hdl_rec->is_configured =
- clmsv_msg->info.is_member_info.is_configured;
+ clmsv_msg->info.is_member_info.is_configured;
+ if (NCSCC_RC_SUCCESS !=
+ m_NCS_IPC_SEND(&clma_hdl_rec->mbx, clmsv_msg,
+ static_cast<NCS_IPC_PRIORITY>(prio))) {
+ TRACE("IPC SEND FAILED");
+ TRACE_LEAVE();
+ return NCSCC_RC_FAILURE;
+ }
} break;
default:
/** Unexpected message **/
@@ -905,7 +912,8 @@ uint32_t clma_clms_msg_proc(clma_cb_t *cb, CLMSV_MSG
*clmsv_msg,
******************************************************************************/
static uint32_t clma_mds_rcv(struct ncsmds_callback_info *mds_cb_info) {
- CLMSV_MSG *clmsv_msg = (CLMSV_MSG *)mds_cb_info->info.receive.i_msg;
+ CLMSV_MSG *clmsv_msg = reinterpret_cast<CLMSV_MSG *>
+ (mds_cb_info->info.receive.i_msg);
uint32_t rc;
TRACE_ENTER();
pthread_mutex_lock(&clma_cb.cb_lock);
@@ -1092,8 +1100,9 @@ static uint32_t clma_mds_callback(struct
ncsmds_callback_info *info) {
if (rc != NCSCC_RC_SUCCESS) TRACE("MDS_CALLBACK_SVC_EVENT not in range");
return rc;
- } else
+ } else {
return NCSCC_RC_SUCCESS;
+ }
}
/****************************************************************************
@@ -1239,11 +1248,12 @@ uint32_t clma_mds_msg_sync_send(clma_cb_t *cb,
CLMSV_MSG *i_msg,
/* send the message */
if (NCSCC_RC_SUCCESS == (rc = ncsmds_api(&mds_info))) {
/* Retrieve the response and take ownership of the memory */
- *o_msg = (CLMSV_MSG *)mds_info.info.svc_send.info.sndrsp.o_rsp;
+ *o_msg = reinterpret_cast<CLMSV_MSG *>
+ (mds_info.info.svc_send.info.sndrsp.o_rsp);
mds_info.info.svc_send.info.sndrsp.o_rsp = nullptr;
- } else
+ } else {
TRACE("clma_mds_msg_sync_send FAILED");
-
+ }
TRACE_LEAVE();
return rc;
}
--
2.17.1
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel