Enable reloading service_actions and dependency tables
When a service is provisioned dynamically, service_action and service_dependency tables need to be reload for the new service. Story: 2005486 Task: 30585 Change-Id: I420fe7390c1953c9f82e2978f135c3321443962d Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
parent
c6748557ef
commit
7f41aa6148
|
@ -90,12 +90,7 @@ static SmErrorT sm_service_action_table_add( void* user_data[], void* record )
|
|||
return( SM_FAILED );
|
||||
}
|
||||
|
||||
if( !(db_service.provisioned) )
|
||||
{
|
||||
return( SM_OKAY );
|
||||
}
|
||||
|
||||
service_action = sm_service_action_table_read(
|
||||
service_action = sm_service_action_table_read(
|
||||
db_service_action->service_name,
|
||||
db_service_action->action );
|
||||
if( NULL == service_action )
|
||||
|
|
|
@ -192,6 +192,12 @@ SmErrorT sm_service_dependency_table_load( void )
|
|||
SmDbServiceDependencyT service_dependency;
|
||||
SmErrorT error;
|
||||
|
||||
if( NULL != _service_dependency )
|
||||
{
|
||||
SM_LIST_CLEANUP_ALL( _service_dependency );
|
||||
_service_dependency = NULL;
|
||||
}
|
||||
|
||||
error = sm_db_foreach( SM_DATABASE_NAME, SM_SERVICE_DEPENDENCY_TABLE_NAME,
|
||||
NULL, &service_dependency,
|
||||
sm_db_service_dependency_convert,
|
||||
|
@ -214,8 +220,6 @@ SmErrorT sm_service_dependency_table_initialize( void )
|
|||
{
|
||||
SmErrorT error;
|
||||
|
||||
_service_dependency = NULL;
|
||||
|
||||
error = sm_db_connect( SM_DATABASE_NAME, &_sm_db_handle );
|
||||
if( SM_OKAY != error )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue