From: Sung-jae Park Date: Wed, 30 May 2012 11:33:56 +0000 (+0900) Subject: Monitoring the crashes from the callback of the livebox. X-Git-Tag: submit/tizen_mobile/20150512.125148^2~1^2~15^2~8^2~245 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ec16492766508288150e1229b3c292fb50e376b4;p=platform%2Fcore%2Fappfw%2Fdata-provider-slave.git Monitoring the crashes from the callback of the livebox. Change-Id: Icee9442de65d3a5cd016e0637dadfb9342df3f2d --- diff --git a/debian/changelog b/debian/changelog index 930082c..8eaf5a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +data-provider-slave (0.0.6) unstable; urgency=low + + * Git: slp/pkgs/d/data-provider-slave + * Tag: data-provider-slave_0.0.6 + + -- Sung-jae Park Wed, 30 May 2012 20:34:23 +0900 + data-provider-slave (0.0.5) unstable; urgency=low * Git: slp/pkgs/d/data-provider-slave diff --git a/include/conf.h b/include/conf.h index 84c6de5..ec1d46d 100644 --- a/include/conf.h +++ b/include/conf.h @@ -53,7 +53,7 @@ extern void conf_init(void); #define DEFAULT_UPDATE_TIMEOUT 7 #define BASE_W 720 #define BASE_H 1280 -#define MINIMUM_UPDATE_INTERVAL 0.1f +#define MINIMUM_UPDATE_INTERVAL 0.5f #define CR 13 diff --git a/include/util.h b/include/util.h index 7afe0a3..6bc430a 100644 --- a/include/util.h +++ b/include/util.h @@ -21,7 +21,6 @@ extern int util_get_pkgname(Ecore_X_Window win, char *pkgname, int size); extern int util_check_ext(const char *icon, const char *ext); -extern int util_unlink(const char *filename); extern double util_get_timestamp(void); /* End of a file */ diff --git a/packaging/com.samsung.data-provider-slave.spec b/packaging/com.samsung.data-provider-slave.spec index a5f7738..aca9f48 100644 --- a/packaging/com.samsung.data-provider-slave.spec +++ b/packaging/com.samsung.data-provider-slave.spec @@ -1,6 +1,6 @@ Name: com.samsung.data-provider-slave Summary: Slave data provider -Version: 0.0.4 +Version: 0.0.6 Release: 1 Group: main/app License: Samsung Proprietary License diff --git a/src/dbus.c b/src/dbus.c index d8b3f7a..bb41867 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -322,8 +322,6 @@ static void method_pause(GDBusMethodInvocation *inv, GVariant *param) g_variant_get(param, "(d)", ×tamp); - DbgPrint("Pause at %lf\n", timestamp); - param = g_variant_new("(i)", 0); g_dbus_method_invocation_return_value(inv, param); @@ -336,8 +334,6 @@ static void method_resume(GDBusMethodInvocation *inv, GVariant *param) g_variant_get(param, "(d)", ×tamp); - DbgPrint("Resume at %lf\n", timestamp); - param = g_variant_new("(i)", 0); g_dbus_method_invocation_return_value(inv, param); @@ -419,7 +415,7 @@ static void method_new(GDBusMethodInvocation *inv, GVariant *param) /* TODO: timeout, livebox_script, period */ ret = livebox_create(pkgname, filename, content, timeout, has_livebox_script, period, cluster, category, &w, &h, &priority, pinup, skip_need_to_create, abi); - DbgPrint("Recreate livebox: pkgname[%s], filename[%s], content[%s]" \ + DbgPrint("Create livebox: pkgname[%s], filename[%s], content[%s]" \ ", timeout[%d]" \ ", has_livebox_script[%d]" \ ", period[%lf]" \ diff --git a/src/livebox.c b/src/livebox.c index bad598f..1e3d74c 100644 --- a/src/livebox.c +++ b/src/livebox.c @@ -62,6 +62,7 @@ static inline void update_monitor_cnt(struct item *item) * And handling this heavy updating from the * file update callback. */ + DbgPrint("Update interval: %lf\n", interval); if (interval >= MINIMUM_UPDATE_INTERVAL) item->monitor_cnt++; else @@ -98,6 +99,7 @@ static inline int output_handler(struct item *item) DbgPrint("monitor_cnt: %d\n", item->monitor_cnt); if (item->monitor_cnt == 0) { + fault_unmark_call(item->inst->item->pkgname, item->inst->filename, "update,crashed"); if (item->monitor) { DbgPrint("Destroy monitor: %p\n", item->monitor); ecore_timer_del(item->monitor); @@ -225,6 +227,7 @@ static Eina_Bool update_timeout_cb(void *data) if (s_info.update != item) ErrPrint("Updating item is not matched\n"); + fault_unmark_call(item->inst->item->pkgname, item->inst->filename, "update,crashed"); fault_mark_call(item->inst->item->pkgname, item->inst->filename, "update,timeout"); s_info.update = NULL; @@ -273,7 +276,14 @@ static Eina_Bool updator_cb(void *data) item->monitor_cnt = 1; s_info.update = item; + ret = so_update(item->inst); + /*! + * \note + * While waiting the Callback function call, + * Add this for finding the crash + */ + fault_mark_call(item->inst->item->pkgname, item->inst->filename, "update,crashed"); if (ret < 0) { item->monitor_cnt--; diff --git a/src/util.c b/src/util.c index 04a4e90..235b534 100644 --- a/src/util.c +++ b/src/util.c @@ -75,33 +75,6 @@ int util_check_ext(const char *icon, const char *ext) return *ext ? 0 : 1; } -int util_unlink(const char *filename) -{ - char *descfile; - int desclen; - - desclen = strlen(filename) + 6; /* .desc */ - descfile = malloc(desclen); - if (descfile) { - int ret; - ret = snprintf(descfile, desclen, "%s.desc", filename); - if (ret < 0) { - DbgPrint("Error: %s\n", strerror(errno)); - } else { - ret = unlink(descfile); - if (ret < 0) - DbgPrint("Unlink: %s - %s\n", - descfile, strerror(errno)); - } - free(descfile); - } - - if (unlink(filename) < 0) - DbgPrint("Unlink: %s - %s\n", filename, strerror(errno)); - - return 0; -} - double util_get_timestamp(void) { struct timeval tv;