Fixed crash issue 67/64267/2 accepted/tizen/mobile/20160331.103808 submit/tizen_mobile/20160331.065907
authorjin0.kim <jin0.kim@samsung.com>
Thu, 31 Mar 2016 05:59:28 +0000 (14:29 +0830)
committerjin0.kim <jin0.kim@samsung.com>
Thu, 31 Mar 2016 06:41:15 +0000 (15:11 +0830)
Change-Id: Ic1b8a3b1fad3bca664e5eb28d56387a9d020a8ac

daemon/service/uninstall.c

index 9ae35ed..df7e953 100755 (executable)
@@ -83,10 +83,13 @@ static void _pkgmgr_event_cb(const char *type, const char *package,
                return;
        }
 
-       SDBG("package:%s event_type:%s event_state:%s", package, event_type, event_state);
+       if (event_type != PACKAGE_MANAGER_EVENT_TYPE_UNINSTALL) {
+               return;
+       }
+
+       SDBG("type : %s event_type:%d event_state:%d [%s]", type, event_type, event_state, package);
 
-       if (event_type == PACKAGE_MANAGER_EVENT_TYPE_UNINSTALL &&
-               event_state == PACKAGE_MANAGER_EVENT_STATE_STARTED) {
+       if (event_state == PACKAGE_MANAGER_EVENT_STATE_STARTED) {
 
                DBG("Pkg:%s is being uninstalled", package);
 
@@ -97,8 +100,7 @@ static void _pkgmgr_event_cb(const char *type, const char *package,
                } else {
                        ERR("failed to create event item");
                }
-       } else if (event_type == PACKAGE_MANAGER_EVENT_TYPE_UNINSTALL &&
-               event_state == PACKAGE_MANAGER_EVENT_STATE_COMPLETED) {
+       } else if (event_state == PACKAGE_MANAGER_EVENT_STATE_COMPLETED) {
 
                if (_is_item_exist(package, 1) == 1) {
                        DBG("Pkg:%s is uninstalled, delete related resource", package);