Please ignore to review this version. I will send the update later.

-----Original Message-----
From: Thang Duc Nguyen <thang.d.ngu...@dektech.com.au> 
Sent: Wednesday, February 19, 2020 2:04 PM
To: Minh Hon Chau <minh.c...@dektech.com.au>; Thuan Tran 
<thuan.t...@dektech.com.au>; Gary Lee <gary....@dektech.com.au>
Cc: opensaf-devel@lists.sourceforge.net; Thang Duc Nguyen 
<thang.d.ngu...@dektech.com.au>
Subject: [PATCH 1/1] amfnd: ignore remove assignment NPI comp in shutdown 
[#3157]

Ignore remove assignment for NPI component if node is in shutdown state.
---
 src/amf/amfnd/susm.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/amf/amfnd/susm.cc b/src/amf/amfnd/susm.cc index 
86811f1e4..c22fce55b 100644
--- a/src/amf/amfnd/susm.cc
+++ b/src/amf/amfnd/susm.cc
@@ -3221,6 +3221,11 @@ uint32_t avnd_su_pres_terming_compuninst_hdler(AVND_CB 
*cb, AVND_SU *su,
     osafassert(comp != nullptr);
     curr_csi = m_AVND_CSI_REC_FROM_COMP_DLL_NODE_GET(
         m_NCS_DBLIST_FIND_FIRST(&comp->csi_list));
+    // Ignore in shutdown state
+    if ((cb->term_state == AVND_TERM_STATE_OPENSAF_SHUTDOWN_STARTED) &&
+        (curr_csi == nullptr)) {
+      goto done;
+    }
     osafassert(curr_csi);
 
     /* mark the csi state assigned/removed */
--
2.17.1



_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to