Ack with minor comment.
Update commit msg due to the fix just apply to HC period.


-----Original Message-----
From: Dat Tran Quoc Phan <[email protected]> 
Sent: Friday, December 17, 2021 9:29 AM
To: Hieu Hong Hoang <[email protected]>; Huu The Truong 
<[email protected]>; Minh Hon Chau <[email protected]>; Thang 
Duc Nguyen <[email protected]>; Thien Minh Huynh 
<[email protected]>
Cc: [email protected]; Dat Tran Quoc Phan 
<[email protected]>
Subject: [PATCH 1/1] amf: Restart healthcheck timer after changing 
saAmfHctDefPeriod/saAmfHctDefMaxDuration [#3298]

Change of saAmfHctDefPeriod/saAmfHctDefMaxDuration will not take effect 
immediately.
The healthcheck timer will wait to end the old values of two attributes before 
apply new values.
Restart the healthcheck timer right after update new values to make them take 
effect immediately.
---
 src/amf/amfnd/hcdb.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/amf/amfnd/hcdb.cc b/src/amf/amfnd/hcdb.cc index 
a99e6904f..aefacf19e 100644
--- a/src/amf/amfnd/hcdb.cc
+++ b/src/amf/amfnd/hcdb.cc
@@ -322,6 +322,11 @@ static void comp_hctype_update_compdb(AVND_CB *cb, 
AVSV_PARAM_INFO *param) {
               osafassert(0);
               break;
           }
+          // Ref #3298
+          uint32_t rc = avnd_start_tmr(avnd_cb, &comp_hc_rec->tmr, AVND_TMR_HC,
+                                    comp_hc_rec->period, comp_hc_rec->opq_hdl);
+          osafassert(rc == NCSCC_RC_SUCCESS);
+          comp_hc_rec->status = AVND_COMP_HC_STATUS_STABLE;
         }
       }
       osaf_extended_name_free(&hlt_chk.comp_name);
--
2.17.1



_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to