From: jongmyeongko Date: Fri, 11 Mar 2016 07:39:47 +0000 (+0900) Subject: fix launch_on_event failure. X-Git-Tag: accepted/tizen/common/20160316.160019^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F21%2F61921%2F2;p=platform%2Fcore%2Fappfw%2Fevent-system.git fix launch_on_event failure. And, remove gathering appinfo for globalappuser (it's not needed) Change-Id: I9752e8b8b47ea3dc28258b96b7e64f443b74321c Signed-off-by: jongmyeongko --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d620f0..6d1c5e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ ENDFOREACH(flag) ## Additional flag SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden") -SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -Wall") +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -Wall -Werror") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") ## Linker flags diff --git a/src/esd_main.c b/src/esd_main.c index 1632334..9d9af13 100644 --- a/src/esd_main.c +++ b/src/esd_main.c @@ -729,9 +729,10 @@ static void __esd_event_launch_with_appid(gpointer data, gpointer user_data) char event_uri[1024]; bundle *b; - _D("launch_on_event: app_id(%s), event_name(%s)", app_id, eep->event_name); + _D("launch_on_event: app_id(%s), event_name(%s), uid(%d)", + app_id, eep->event_name, uid); - if (aul_app_is_running_for_uid(app_id, uid)) { + if (!aul_app_is_running_for_uid(app_id, uid)) { snprintf(event_uri, sizeof(event_uri), "event://%s", eep->event_name); b = bundle_dup(eep->event_data); appsvc_set_operation(b, APPSVC_OPERATION_LAUNCH_ON_EVENT); @@ -743,7 +744,7 @@ static void __esd_event_launch_with_appid(gpointer data, gpointer user_data) bundle_free(b); } else { - _D("already is running"); + _D("already is running or launch failed"); } } @@ -1529,7 +1530,6 @@ static void __esd_on_name_lost(GDBusConnection *connection, static int __esd_before_loop(void) { int ret = 0; - uid_t uid = 0; GError *error = NULL; guint owner_id = 0; @@ -1656,19 +1656,6 @@ static int __esd_before_loop(void) #endif event_launch_table = g_hash_table_new(g_str_hash, g_str_equal); - - _I("get event launch list"); - - /* get global user info */ - uid = GLOBAL_USER; - ret = pkgmgrinfo_appinfo_get_usr_installed_list(__esd_add_appinfo_handler, uid, &uid); - if (ret < 0) { - _E("failed to get global-app list (%d)", ret); - return ES_R_ERROR; - } - - __esd_launch_table_print_items(); - trusted_busname_table = g_hash_table_new(g_str_hash, g_str_equal); /* gdbus setup for method call */