Fix the crash bug of slave.
authorSung-jae Park <nicesj.park@samsung.com>
Wed, 17 Jul 2013 01:04:29 +0000 (10:04 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Wed, 17 Jul 2013 01:04:29 +0000 (10:04 +0900)
When a box is deleted automatically, the slave tries to delete a timer twice.

Change-Id: I0e45ad20d4086928bdbff2d9cf6250b8df4c5bff

packaging/org.tizen.data-provider-slave.spec
src/fault.c
src/lb.c

index 6527889..47afbc9 100644 (file)
@@ -2,7 +2,7 @@
 
 Name: org.tizen.data-provider-slave
 Summary: Plugin type livebox service provider.
-Version: 0.12.3
+Version: 0.12.4
 Release: 1
 Group: HomeTF/Livebox
 License: Flora License
index 4e5c09e..26ad904 100644 (file)
@@ -118,16 +118,22 @@ HAPI int fault_init(void)
        act.sa_sigaction = signal_handler;
        act.sa_flags = SA_SIGINFO;
 
-       sigemptyset(&act.sa_mask);
+       if (sigemptyset(&act.sa_mask) != 0)
+               ErrPrint("Failed to init signal: %s\n", strerror(errno));
 
-       sigaddset(&act.sa_mask, SIGUSR1);
-       sigaddset(&act.sa_mask, SIGALRM);
+       if (sigaddset(&act.sa_mask, SIGUSR1) != 0)
+               ErrPrint("Failed to add set: %s\n", strerror(errno));
+       if (sigaddset(&act.sa_mask, SIGALRM) != 0)
+               ErrPrint("Failed to add set: %s\n", strerror(errno));
 
        ecore_abort = getenv("ECORE_ERROR_ABORT");
        if (!ecore_abort || ecore_abort[0] != '1') {
-               sigaddset(&act.sa_mask, SIGSEGV);
-               sigaddset(&act.sa_mask, SIGABRT);
-               sigaddset(&act.sa_mask, SIGILL);
+               if (sigaddset(&act.sa_mask, SIGSEGV) != 0)
+                       ErrPrint("Failed to add set: %s\n", strerror(errno));
+               if (sigaddset(&act.sa_mask, SIGABRT) != 0)
+                       ErrPrint("Failed to add set: %s\n", strerror(errno));
+               if (sigaddset(&act.sa_mask, SIGILL) != 0)
+                       ErrPrint("Failed to add set: %s\n", strerror(errno));
 
                if (sigaction(SIGSEGV, &act, NULL) < 0)
                        ErrPrint("Failed to install the SEGV handler\n");
index 945b05e..11a675c 100644 (file)
--- a/src/lb.c
+++ b/src/lb.c
@@ -613,9 +613,6 @@ static Eina_Bool updator_cb(void *data)
                if (so_need_to_destroy(item->inst) == NEED_TO_DESTROY) {
                        provider_send_deleted(item->inst->item->pkgname, item->inst->id);
                        lb_destroy(item->inst->item->pkgname, item->inst->id);
-
-                       ecore_timer_del(item->timer);
-                       item->timer = NULL;
                        return ECORE_CALLBACK_CANCEL;
                }