osaf/services/infrastructure/fm/fms/fm_main.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
Two bugs have been fixed related to starting the activation supervision timer: 1) There was a cut-and-paste bug where the conditions are checking the status of the promote active timer instead of the activation supervision timer 2) The timer was only started in the RDA callback, but not initially at startup after reading the RDA role diff --git a/osaf/services/infrastructure/fm/fms/fm_main.c b/osaf/services/infrastructure/fm/fms/fm_main.c --- a/osaf/services/infrastructure/fm/fms/fm_main.c +++ b/osaf/services/infrastructure/fm/fms/fm_main.c @@ -193,6 +193,13 @@ int main(int argc, char *argv[]) if (fm_rda_init(fm_cb) != NCSCC_RC_SUCCESS) { goto fm_init_failed; } + if (fm_cb->role == PCS_RDA_ACTIVE && + fm_cb->activation_supervision_tmr_val != 0) { + LOG_NO("Starting initial activation supervision: %" PRIu64 "ms", + 10 * (uint64_t) fm_cb->activation_supervision_tmr_val); + fm_tmr_start(&fm_cb->activation_supervision_tmr, + fm_cb->activation_supervision_tmr_val); + } if ((control_tipc = getenv("OPENSAF_MANAGE_TIPC")) == NULL) fm_cb->control_tipc = false; else if (strncmp(control_tipc, "yes", 3) == 0) @@ -559,7 +566,7 @@ static void fm_evt_proc_rda_callback(FM_ TRACE_ENTER2("%d", (int) evt->info.rda_info.role); if (evt->info.rda_info.role != PCS_RDA_ACTIVE && - cb->promote_active_tmr.status == FM_TMR_RUNNING) { + cb->activation_supervision_tmr.status == FM_TMR_RUNNING) { fm_tmr_stop(&cb->activation_supervision_tmr); LOG_NO("Stopped activation supervision due to new role %u", (unsigned) evt->info.rda_info.role); @@ -568,7 +575,7 @@ static void fm_evt_proc_rda_callback(FM_ cb->role != PCS_RDA_ACTIVE && cb->amf_state != SA_AMF_HA_ACTIVE && cb->activation_supervision_tmr_val != 0 && - cb->promote_active_tmr.status != FM_TMR_RUNNING) { + cb->activation_supervision_tmr.status != FM_TMR_RUNNING) { LOG_NO("Starting activation supervision: %" PRIu64 "ms", 10 * (uint64_t) cb->activation_supervision_tmr_val); fm_tmr_start(&cb->activation_supervision_tmr, ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel