- #3102 introduce remote adest list which refer svc_cnt to start/stop
timer to delete adest from list. But in tcp transport, svc down may
come twice then svc_cnt is updated incorrectly. Later cause crash inside
function stop_mds_down_tmr().
- check svc_cnt greater than zero before decrease it then no crash as
consequence of this wrong counter.
---
src/mds/mds_c_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mds/mds_c_api.c b/src/mds/mds_c_api.c
index a76b2b76a..42e26f91c 100644
--- a/src/mds/mds_c_api.c
+++ b/src/mds/mds_c_api.c
@@ -3661,7 +3661,7 @@ uint32_t mds_mcm_svc_down(PW_ENV_ID pwe_id, MDS_SVC_ID
svc_id, V_DEST_RL role,
(MDS_ADEST_INFO *)ncs_patricia_tree_get(
&gl_mds_mcm_cb->adest_list,
(uint8_t *)&adest);
- if (adest_info) {
+ if (adest_info && adest_info->svc_cnt > 0) {
adest_info->svc_cnt--;
if (adest_info->svc_cnt == 0) {
m_MDS_LOG_INFO(
--
2.17.1
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel