summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunho Kang <hhstark.kang@samsung.com>2017-08-16 13:44:32 +0900
committerHyunho Kang <hhstark.kang@samsung.com>2017-08-16 05:52:07 +0000
commit0d0c874054abb035f5246b0f7a482dc1ccb24e7c (patch)
treea55a4d50d1982af2c1e3c53ed8a302be5ce76aa2
parent90b1ca01336a649bc742e3c0fcc3ebfeff81854f (diff)
downloadappcore-widget-0d0c874054abb035f5246b0f7a482dc1ccb24e7c.tar.gz
appcore-widget-0d0c874054abb035f5246b0f7a482dc1ccb24e7c.tar.bz2
appcore-widget-0d0c874054abb035f5246b0f7a482dc1ccb24e7c.zip
Change-Id: I6870e0ff6bd93f92f100ad8a0baf6f9d84285dce Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
-rwxr-xr-xsrc/widget_app.c18
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;
}