From: Vyacheslav Cherkashin Date: Wed, 3 Sep 2014 14:38:19 +0000 (+0400) Subject: [FIX] calculation app_type X-Git-Tag: Tizen_SDK_2.3~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60049f451ced153593aefea42d3fdf8f6382264d;p=platform%2Fcore%2Fsystem%2Fswap-manager.git [FIX] calculation app_type Change-Id: I922c141c7ee213140aa143910be8371e6ef96fab Signed-off-by: Vyacheslav Cherkashin --- diff --git a/daemon/daemon.c b/daemon/daemon.c index 38acb2e..d903788 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -502,12 +502,15 @@ static pid_t get_current_pid(void) static void target_set_type(struct target *t) { pid_t ppid = target_get_ppid(t); + enum app_type_t app_type = APP_TYPE_UNKNOWN; if (get_current_pid() == ppid) { - t->app_type = APP_TYPE_COMMON; + app_type = APP_TYPE_COMMON; } else if (get_lpad_pid(ppid) == ppid) { - t->app_type = APP_TYPE_TIZEN; + app_type = APP_TYPE_TIZEN; } + + t->app_type = app_type; } diff --git a/daemon/target.c b/daemon/target.c index 471d4e6..3dbeb66 100644 --- a/daemon/target.c +++ b/daemon/target.c @@ -44,6 +44,7 @@ struct target *target_ctor(void) t = target_malloc(); if (t) { + t->app_type = APP_TYPE_UNKNOWN; t->pid = UNKNOWN_PID; t->socket = UNKNOWN_FD; t->event_fd = UNKNOWN_FD;