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:
parent
778d4e2dcf
commit
51f63ee2e6
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 )&&
|
||||
|
|
Loading…
Reference in New Issue