Fix no swact for failure of critical services
This fix is to ensure keeping service failure counting over successful audit. When service enabled audit successfully completes, SM reset the service failure state. However it should not reset the service fail-count. The fail-count should only be reset after the grace period. Closes-Bug: 1893669 Change-Id: I6996fe3f1c08c38da6f26243aee2b95b083069f0 Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
parent
cb5fa9510f
commit
9f70df63fd
|
@ -40,7 +40,6 @@ bool sm_service_clear_failure_state(SmServiceT* service)
|
|||
bool prev_failure_condition;
|
||||
prev_failure_condition =
|
||||
service->recover ||
|
||||
service->fail_count > 0 ||
|
||||
service->action_fail_count > 0 ||
|
||||
service->transition_fail_count > 0 ||
|
||||
service->status == SM_SERVICE_STATUS_FAILED ||
|
||||
|
@ -50,7 +49,6 @@ bool sm_service_clear_failure_state(SmServiceT* service)
|
|||
if( prev_failure_condition )
|
||||
{
|
||||
service->recover = false;
|
||||
service->fail_count = 0;
|
||||
service->action_fail_count = 0;
|
||||
service->transition_fail_count = 0;
|
||||
service->status = SM_SERVICE_STATUS_NONE;
|
||||
|
|
Loading…
Reference in New Issue