fixed term timer cb bug
authorJaeho Lee <jaeho81.lee@samsung.com>
Wed, 3 Apr 2013 09:55:16 +0000 (18:55 +0900)
committerJaeho Lee <jaeho81.lee@samsung.com>
Wed, 3 Apr 2013 09:55:16 +0000 (18:55 +0900)
Signed-off-by: Jaeho Lee <jaeho81.lee@samsung.com>
am_daemon/amd_request.c
am_daemon/amd_status.c
src/status.c

index 385ee97..6223766 100755 (executable)
@@ -374,7 +374,8 @@ static gboolean __request_handler(gpointer data)
                case APP_STATUS_UPDATE:
                        status = (int *)pkt->data;
                        ret = _status_update_app_info_list(cr.pid, *status);
-                       __send_result_to_client(clifd, ret);
+                       //__send_result_to_client(clifd, ret);
+                       close(clifd);
                        break;
                case APP_RELEASED:
                        appid = malloc(MAX_PACKAGE_STR_SIZE);
index a17741c..627763b 100755 (executable)
@@ -70,10 +70,12 @@ int _status_add_app_info_list(char *appid, char *app_path, int pid)
 
 static Eina_Bool __app_terminate_timer_cb(void *data)
 {
-       app_status_info_t *info_t = (app_status_info_t *)data;
+       int pid = (int)data;
        int ret = 0;
 
-       ret = kill(info_t->pid, SIGKILL);
+       _D("pid(%d)", pid);
+
+       ret = kill(pid, SIGKILL);
        if (ret == -1)
                _E("send SIGKILL: %s", strerror(errno));
 
@@ -91,7 +93,7 @@ int _status_update_app_info_list(int pid, int status)
                if(pid == info_t->pid) {
                        info_t->status = status;
                        if(status == STATUS_DYING) {
-                               ecore_timer_add(2, __app_terminate_timer_cb, info_t);
+                               ecore_timer_add(2, __app_terminate_timer_cb, info_t->pid);
                        }
                        break;
                }
index 69a46a0..83678b6 100755 (executable)
@@ -31,7 +31,7 @@ SLPAPI int aul_status_update(int status)
 {
        int ret;
 
-       ret = __app_send_raw(AUL_UTIL_PID, APP_STATUS_UPDATE, (unsigned char *)&status, sizeof(status));
+       ret = __app_send_raw_with_noreply(AUL_UTIL_PID, APP_STATUS_UPDATE, (unsigned char *)&status, sizeof(status));
 
        return ret;
 }