Return no such pkg error when failed to get pkgtype 11/104011/2 accepted/tizen/3.0/common/20161213.163816 accepted/tizen/3.0/ivi/20161213.064817 accepted/tizen/3.0/mobile/20161213.064704 accepted/tizen/3.0/tv/20161213.064735 accepted/tizen/3.0/wearable/20161213.064753 submit/tizen_3.0/20161212.103225
authorJunghyun Yeon <jungh.yeon@samsung.com>
Mon, 12 Dec 2016 05:52:40 +0000 (14:52 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Mon, 12 Dec 2016 06:43:59 +0000 (15:43 +0900)
Change-Id: I33265d0a30cd4162551d1cff3489797ce933fe05
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/request.c

index c03f602..4db0f6d 100644 (file)
@@ -471,7 +471,7 @@ static int __handle_request_reinstall(uid_t caller_uid,
        pkgtype = _get_pkgtype_from_pkgid(pkgid, target_uid);
        if (pkgtype == NULL) {
                g_dbus_method_invocation_return_value(invocation,
-                               g_variant_new("(is)", PKGMGR_R_ESYSTEM, ""));
+                               g_variant_new("(is)", PKGMGR_R_ENOPKG, ""));
                return -1;
        }
 
@@ -517,7 +517,7 @@ static int __handle_request_uninstall(uid_t caller_uid,
        pkgtype = _get_pkgtype_from_pkgid(pkgid, target_uid);
        if (pkgtype == NULL) {
                g_dbus_method_invocation_return_value(invocation,
-                               g_variant_new("(is)", PKGMGR_R_ESYSTEM, ""));
+                               g_variant_new("(is)", PKGMGR_R_ENOPKG, ""));
                return -1;
        }
 
@@ -565,7 +565,7 @@ static int __handle_request_move(uid_t caller_uid,
        pkgtype = _get_pkgtype_from_pkgid(pkgid, target_uid);
        if (pkgtype == NULL) {
                g_dbus_method_invocation_return_value(invocation,
-                               g_variant_new("(is)", PKGMGR_R_ESYSTEM, ""));
+                               g_variant_new("(is)", PKGMGR_R_ENOPKG, ""));
                return -1;
        }
 
@@ -623,7 +623,7 @@ static int __handle_request_enable_pkgs(uid_t caller_uid,
                if (pkgtype == NULL) {
                        g_dbus_method_invocation_return_value(invocation,
                                        g_variant_new("(is)",
-                                               PKGMGR_R_ESYSTEM, ""));
+                                               PKGMGR_R_ENOPKG, ""));
                        free(reqkey);
                        return -1;
                }
@@ -675,7 +675,7 @@ static int __handle_request_disable_pkgs(uid_t caller_uid,
                if (pkgtype == NULL) {
                        g_dbus_method_invocation_return_value(invocation,
                                        g_variant_new("(is)",
-                                               PKGMGR_R_ESYSTEM, ""));
+                                               PKGMGR_R_ENOPKG, ""));
                        free(reqkey);
                        return -1;
                }
@@ -932,7 +932,7 @@ static int __handle_request_cleardata(uid_t caller_uid,
        pkgtype = _get_pkgtype_from_pkgid(pkgid, target_uid);
        if (pkgtype == NULL) {
                g_dbus_method_invocation_return_value(invocation,
-                               g_variant_new("(i)", PKGMGR_R_ESYSTEM));
+                               g_variant_new("(i)", PKGMGR_R_ENOPKG));
                return -1;
        }