+data-provider-slave (0.2.1) unstable; urgency=low
+
+ * Git: slp/pkgs/d/data-provider-slave
+ * Tag: data-provider-slave_0.2.0
+
+ Fault(crash) detection code is updated
+
+ -- Sung-jae Park <nicesj.park@samsung.com> Mon, 04 Jun 2012 15:47:39 +0900
+
data-provider-slave (0.2.0) unstable; urgency=low
* Git: slp/pkgs/d/data-provider-slave
Name: com.samsung.data-provider-slave
Summary: Slave data provider
-Version: 0.2.0
+Version: 0.2.1
Release: 1
Group: main/app
License: Samsung Proprietary License
#define _GNU_SOURCE
#include <stdio.h>
+#include <string.h>
#include <errno.h>
#include <dlfcn.h>
#include <libgen.h>
#include <sys/time.h>
+#include <execinfo.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
#include <glib.h>
#include <glib-object.h>
DbgPrint("ALARM: %d.%d (%d)\n",
res_tv.tv_sec, res_tv.tv_usec, DEFAULT_LIFE_TIMER);
+ } else {
+ int i;
+ int fd;
+ int *stack;
+ char *ptr;
+ int len;
+ char log_fname[100];
+
+ snprintf(log_fname, sizeof(log_fname), "/opt/share/live_magazine/log/slave.%d", getpid());
+
+ fd = open(log_fname, O_RDWR|O_CREAT|O_SYNC, 0644);
+ for (stack = &signum, i = 0; i < 100; i++, stack++) {
+ if (!dladdr((void *)*stack, &dinfo))
+ continue;
+
+ len = strlen(dinfo.dli_fname);
+ while (len > 0 && dinfo.dli_fname[len] != '/')
+ len--;
+
+ if (len == 0)
+ continue;
+
+ if (dinfo.dli_fname[len] == '/')
+ len++; /* for skipping '/' */
+
+ ptr = (char *)dinfo.dli_fname + len;
+
+ if (strncmp(ptr, "liblive-", strlen("liblive-")))
+ continue;
+
+ ErrPrint("[%d] File: %s\n", i, ptr);
+ if (fd > 0)
+ write(fd, ptr, strlen(ptr));
+
+ break;
+ }
+
+ if (fd > 0)
+ close(fd);
}
ErrPrint("=====\n");
{
struct sigaction act;
+ if (access("/tmp/live.err", F_OK) == 0)
+ ErrPrint("Error log still exists (/tmp/live.err)\n");
+
act.sa_sigaction = signal_handler;
act.sa_flags = SA_SIGINFO;
* 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
item = data;
-// if (item->inst->item->has_livebox_script)
-// return EXIT_SUCCESS;
-
if (so_get_output_info(item->inst, &w, &h, &priority) == DONE) {
item->inst->w = w;
item->inst->h = h;
char *tmp;
int len;
-// if (!item->inst->item->has_livebox_script)
- update_monitor_del_update_cb(item->inst->filename, file_updated_cb);
+ update_monitor_del_update_cb(item->inst->filename, file_updated_cb);
len = strlen(item->inst->filename) + strlen(".desc") + 1;
tmp = malloc(len);
static inline int update_monitor_add(struct item *item)
{
-// if (!item->inst->item->has_livebox_script)
- add_file_update_monitor(item);
+ add_file_update_monitor(item);
add_desc_update_monitor(item);
return 0;
}
Eina_List *l;
struct item *item;
- if (s_info.paused)
- return;
-
s_info.paused = 1;
EINA_LIST_FOREACH(s_info.item_list, l, item) {
Eina_List *l;
struct item *item;
- if (!s_info.paused)
- return;
-
s_info.paused = 0;
EINA_LIST_FOREACH(s_info.item_list, l, item) {