From 15b3e1256f3ef36ce677970da4762bee26b7d887 Mon Sep 17 00:00:00 2001 From: Jin Yoon Date: Mon, 4 Feb 2013 19:37:47 +0900 Subject: [PATCH] Do not destroy ail resources when ail returns an error code Change-Id: I7d84e1400e6ca86e4b68dddf61988984ea5b904d --- debian/changelog | 11 ++++++++++- packaging/starter.spec | 2 +- src/hw_key.c | 1 + src/pkg_event.c | 26 ++++++++++++++------------ 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/debian/changelog b/debian/changelog index 89f88e6..05bf12b 100755 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,17 @@ +starter (0.4.56) unstable; urgency=low + + * Git: slp/pkgs/s/starter + * Tag: starter_0.4.56 + + * Do not destroy ail resources when ail returns an error code + + -- Jin Yoon Mon, 04 Feb 2013 19:05:45 +0900 + starter (0.4.55) unstable; urgency=low * fix manifest file. - -- minho07.kim Thu, 30 Jan 2013 11:39:48 +0900 + -- minho07.kim Thu, 31 Jan 2013 11:34:26 +0900 starter (0.4.54) unstable; urgency=low diff --git a/packaging/starter.spec b/packaging/starter.spec index f3878b3..b33cc21 100755 --- a/packaging/starter.spec +++ b/packaging/starter.spec @@ -1,6 +1,6 @@ Name: starter Summary: starter -Version: 0.4.55 +Version: 0.4.56 Release: 1 Group: TO_BE/FILLED_IN License: TO_BE/FILLED_IN diff --git a/src/hw_key.c b/src/hw_key.c index d6a0933..9d9093d 100755 --- a/src/hw_key.c +++ b/src/hw_key.c @@ -17,6 +17,7 @@ #include +#include #include #include #include diff --git a/src/pkg_event.c b/src/pkg_event.c index d17db4f..f03b9ef 100755 --- a/src/pkg_event.c +++ b/src/pkg_event.c @@ -124,19 +124,21 @@ directory_notify(void* data, Ecore_Fd_Handler* fd_handler) ail_error_e ret; ret = ail_get_appinfo(package, &ai); - if (ai) ail_destroy_appinfo(ai); - - - if (AIL_ERROR_NO_DATA == ret) { - if (ail_desktop_add(package) < 0) { - _D("Failed to add a new package (%s)", event->name); + if (AIL_ERROR_OK == ret || AIL_ERROR_NO_DATA == ret) { + if (ai) ail_destroy_appinfo(ai); + + if (AIL_ERROR_NO_DATA == ret) { + if (ail_desktop_add(package) < 0) { + _D("Failed to add a new package (%s)", event->name); + } + } else if (AIL_ERROR_OK == ret) { + if (ail_desktop_update(package) < 0) { + _D("Failed to add a new package (%s)", event->name); + } } - } else if (AIL_ERROR_OK == ret) { - if (ail_desktop_update(package) < 0) { - _D("Failed to add a new package (%s)", event->name); - } - } else - ; + } else { + _E("Failed to get appinfo"); + } } else if (event->mask & IN_DELETE) { if (ail_desktop_remove(package) < 0) _D("Failed to remove a package (%s)", event->name); -- 2.7.4