diff options
author | Hyunho Kang <hhstark.kang@samsung.com> | 2017-08-16 13:44:32 +0900 |
---|---|---|
committer | Hyunho Kang <hhstark.kang@samsung.com> | 2017-08-16 05:52:07 +0000 |
commit | 0d0c874054abb035f5246b0f7a482dc1ccb24e7c (patch) | |
tree | a55a4d50d1982af2c1e3c53ed8a302be5ce76aa2 | |
parent | 90b1ca01336a649bc742e3c0fcc3ebfeff81854f (diff) | |
download | appcore-widget-0d0c874054abb035f5246b0f7a482dc1ccb24e7c.tar.gz appcore-widget-0d0c874054abb035f5246b0f7a482dc1ccb24e7c.tar.bz2 appcore-widget-0d0c874054abb035f5246b0f7a482dc1ccb24e7c.zip |
Do not check period when instance create failsubmit/tizen_3.0/20170816.055230accepted/tizen/3.0/wearable/20170816.131325accepted/tizen/3.0/tv/20170816.131312accepted/tizen/3.0/mobile/20170816.131239accepted/tizen/3.0/ivi/20170816.131300accepted/tizen/3.0/common/20170816.145248
Change-Id: I6870e0ff6bd93f92f100ad8a0baf6f9d84285dce
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
-rwxr-xr-x | src/widget_app.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/widget_app.c b/src/widget_app.c index 50712c8..22d6920 100755 --- a/src/widget_app.c +++ b/src/widget_app.c @@ -513,6 +513,7 @@ static int __instance_create(widget_class_h handle, const char *id, { widget_context_s *wc = NULL; int ret = 0; + int send_ret = 0; bundle *content_info = NULL; wc = (widget_context_s *)calloc(1, sizeof(widget_context_s)); @@ -537,8 +538,11 @@ static int __instance_create(widget_class_h handle, const char *id, ret = handle->ops.create(wc, content_info, w, h, handle->user_data); if (ret < 0) { _W("Create callback resturns error(%d)", ret); - ret = __send_update_status(handle->classid, wc->id, + send_ret = __send_update_status(handle->classid, wc->id, WIDGET_INSTANCE_EVENT_CREATE_ABORTED, NULL); + if (send_ret < 0) + _E("Fail to send abort status (%d)", send_ret); + _widget_app_remove_context(wc); if (wc->id) free(wc->id); @@ -556,17 +560,17 @@ static int __instance_create(widget_class_h handle, const char *id, content = "NULL"; aul_widget_instance_add(handle->classid, id); + + if (period > 0) { + wc->period = period; + wc->periodic_timer = g_timeout_add_seconds(period, + __timeout_cb, wc); + } } if (content_info) bundle_free(content_info); - if (period > 0) { - wc->period = period; - wc->periodic_timer = g_timeout_add_seconds(period, - __timeout_cb, wc); - } - return ret; } |