Ensure a timer is stop if it is orphan

When a service timer routine couldn't find the service it associates to,
the timer should not be rearmed (timer routine returns false).

Change-Id: Ia0f352b8c6cbd63176353a1b2054b216babad605
Story: 2005486
Task: 30623
Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
Bin Qian 2019-04-25 15:34:44 -04:00
parent 778d4e2dcf
commit 51f63ee2e6
9 changed files with 25 additions and 25 deletions

View File

@ -2,4 +2,4 @@ SRC_DIR=$PKG_BASE
COPY_LIST="$PKG_BASE/LICENSE"
TAR_NAME=sm
VERSION=1.0.0
TIS_PATCH_VER=29
TIS_PATCH_VER=30

View File

@ -31,9 +31,9 @@ static bool sm_service_disabled_state_audit_timer( SmTimerIdT timer_id,
service = sm_service_table_read_by_id( id );
if( NULL == service )
{
DPRINTFE( "Failed to read service, error=%s.",
sm_error_str(SM_NOT_FOUND) );
return( true );
DPRINTFE( "Failed to read service %d, error=%s.",
id, sm_error_str(SM_NOT_FOUND) );
return( false );
}
error = sm_service_fsm_event_handler( service->name,

View File

@ -27,9 +27,9 @@ static bool sm_service_disabling_state_timeout_timer( SmTimerIdT timer_id,
service = sm_service_table_read_by_id( id );
if( NULL == service )
{
DPRINTFE( "Failed to read service, error=%s.",
sm_error_str(SM_NOT_FOUND) );
return( true );
DPRINTFE( "Failed to read service %d, error=%s.",
id, sm_error_str(SM_NOT_FOUND) );
return( false );
}
error = sm_service_fsm_event_handler( service->name,

View File

@ -31,9 +31,9 @@ static bool sm_service_enabled_active_state_audit_timer( SmTimerIdT timer_id,
service = sm_service_table_read_by_id( id );
if( NULL == service )
{
DPRINTFE( "Failed to read service, error=%s.",
sm_error_str(SM_NOT_FOUND) );
return( true );
DPRINTFE( "Failed to read service %d, error=%s.",
id, sm_error_str(SM_NOT_FOUND) );
return( false );
}
error = sm_service_fsm_event_handler( service->name,

View File

@ -57,9 +57,9 @@ static bool sm_service_enabled_go_active_state_timeout_timer(
service = sm_service_table_read_by_id( id );
if( NULL == service )
{
DPRINTFE( "Failed to read service, error=%s.",
sm_error_str(SM_NOT_FOUND) );
return( true );
DPRINTFE( "Failed to read service %d, error=%s.",
id, sm_error_str(SM_NOT_FOUND) );
return( false );
}
error = sm_service_fsm_event_handler( service->name,

View File

@ -28,9 +28,9 @@ static bool sm_service_enabled_go_standby_state_timeout_timer(
service = sm_service_table_read_by_id( id );
if( NULL == service )
{
DPRINTFE( "Failed to read service, error=%s.",
sm_error_str(SM_NOT_FOUND) );
return( true );
DPRINTFE( "Failed to read service %d, error=%s.",
id, sm_error_str(SM_NOT_FOUND) );
return( false );
}
error = sm_service_fsm_event_handler( service->name,

View File

@ -65,9 +65,9 @@ static bool sm_service_enabling_state_timeout_timer( SmTimerIdT timer_id,
service = sm_service_table_read_by_id( id );
if( NULL == service )
{
DPRINTFE( "Failed to read service, error=%s.",
sm_error_str(SM_NOT_FOUND) );
return( true );
DPRINTFE( "Failed to read service %d, error=%s.",
id, sm_error_str(SM_NOT_FOUND) );
return( false );
}
error = sm_service_fsm_event_handler( service->name,

View File

@ -31,9 +31,9 @@ static bool sm_service_enabling_throttle_state_timeout_timer( SmTimerIdT timer_i
service = sm_service_table_read_by_id( id );
if( NULL == service )
{
DPRINTFE( "Failed to read service, error=%s.",
sm_error_str(SM_NOT_FOUND) );
return( true );
DPRINTFE( "Failed to read service %d, error=%s.",
id, sm_error_str(SM_NOT_FOUND) );
return( false );
}
error = sm_service_fsm_event_handler( service->name,

View File

@ -97,9 +97,9 @@ static bool sm_service_fsm_fail_countdown_timeout( SmTimerIdT timer_id,
service = sm_service_table_read_by_id( id );
if( NULL == service )
{
DPRINTFE( "Failed to read service, error=%s.",
sm_error_str(SM_NOT_FOUND) );
return( true );
DPRINTFE( "Failed to read service %d, error=%s.",
id, sm_error_str(SM_NOT_FOUND) );
return( false );
}
if(( 0 < service->fail_count )&&