{
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));
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);
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;
}