Hi Gary, ack review only.
(Strange that *o_msg is nullptr when rc is NCSCC_RC_SUCCESS, but in
mcm_pvt_normal_svc_sndrsp
if e.g. this send times out in mds_mcm_time_wait it seems
NCSCC_RC_SUCCESS may be returned?
/Regards HansN
On 03/01/2018 06:32 AM, Gary Lee wrote:
Callers of ava_mds_send() assume *o_msg is not null, if
the return code is NCSCC_RC_SUCCESS.
---
src/amf/agent/ava_mds.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/amf/agent/ava_mds.cc b/src/amf/agent/ava_mds.cc
index 440885332..cd139365d 100644
--- a/src/amf/agent/ava_mds.cc
+++ b/src/amf/agent/ava_mds.cc
@@ -378,6 +378,10 @@ uint32_t ava_mds_send(AVA_CB *cb, AVSV_NDA_AVA_MSG *i_msg,
/* retrieve the response */
*o_msg = (AVSV_NDA_AVA_MSG *)mds_info.info.svc_send.info.sndrsp.o_rsp;
mds_info.info.svc_send.info.sndrsp.o_rsp = 0;
+ if (*o_msg == nullptr) {
+ LOG_ER("No response received");
+ rc = NCSCC_RC_FAILURE;
+ }
}
} else
/* just a 'normal' send */
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel