osaf/services/saf/amf/amfnd/compdb.cc |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)


Problem: If the timer is started, delete the model, load model again,
and kill component in order to escalate to the su restart. Then if the
timer event comes during the escalation, it will reset component restart
counter. So there is no su restart at the end.

Change: Stop the timer (if it started) in the place where removing component

diff --git a/osaf/services/saf/amf/amfnd/compdb.cc 
b/osaf/services/saf/amf/amfnd/compdb.cc
--- a/osaf/services/saf/amf/amfnd/compdb.cc
+++ b/osaf/services/saf/amf/amfnd/compdb.cc
@@ -545,6 +545,12 @@ uint32_t avnd_compdb_rec_del(AVND_CB *cb
        avnd_comp_cbq_del(cb, comp, false);
        avnd_comp_pm_rec_del_all(cb, comp);
 
+       /* Stop saAmfSGCompRestartProb timer if it has been started */
+       if (su->su_err_esc_level == AVND_ERR_ESC_LEVEL_0 && 
su->su_err_esc_tmr.is_active == true) {
+               m_AVND_TMR_COMP_ERR_ESC_STOP(cb, su);
+               m_AVND_SEND_CKPT_UPDT_ASYNC_UPDT(cb, su, 
AVND_CKPT_SU_ERR_ESC_TMR);
+       }
+
        /* remove the association with hdl mngr */
        ncshm_destroy_hdl(NCS_SERVICE_ID_AVND, comp->comp_hdl);
 

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to