From 9d939094ea06fc0d8b2a2d80edf232e399f27306 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 7 Sep 2017 11:19:36 +0900 Subject: [PATCH] Fix appcore base - Removes calling base_exit function in the on_terminate function - Adds appcore_base_exit API Change-Id: I9c2db00a0286bb8aa30a103ff0444d220555036b Signed-off-by: Hwankyu Jhun --- include/appcore_base.h | 2 +- src/base/appcore_base.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/appcore_base.h b/include/appcore_base.h index 106b9c0..795b18a 100644 --- a/include/appcore_base.h +++ b/include/appcore_base.h @@ -88,7 +88,7 @@ bool appcore_base_is_bg_allowed(void); bool appcore_base_is_suspended(void); void appcore_base_toggle_suspended_state(void); int appcore_base_set_i18n(const char *domain_name, const char *dir_name); - +void appcore_base_exit(void); #ifdef __cplusplus } diff --git a/src/base/appcore_base.c b/src/base/appcore_base.c index 15e6db4..5c495f5 100644 --- a/src/base/appcore_base.c +++ b/src/base/appcore_base.c @@ -1060,8 +1060,6 @@ EXPORT_API int appcore_base_on_control(bundle *b) EXPORT_API int appcore_base_on_terminate() { aul_finalize(); - if (__context.ops.exit) - __context.ops.exit(__context.data); return 0; } @@ -1204,6 +1202,12 @@ EXPORT_API void appcore_base_toggle_suspended_state(void) __context.suspended_state ^= __context.suspended_state; } +EXPORT_API void appcore_base_exit(void) +{ + if (__context.ops.exit) + __context.ops.exit(__context.data); +} + static int __on_receive(aul_type type, bundle *b, void *data) { return appcore_base_on_receive(type, b); -- 2.7.4