Fix wrong parameter to get user package info 82/166482/3
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 10 Jan 2018 08:43:14 +0000 (17:43 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 10 Jan 2018 09:54:04 +0000 (18:54 +0900)
Change-Id: I9e9af08a637cb371cfb800e5e9ae3bf766a11471
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
ism/extras/efl_panel/isf_panel_efl.cpp

index 0a89413..a60e958 100644 (file)
@@ -571,7 +571,7 @@ static int pkgmgr_get_appinfo (const char *appid, pkgmgrinfo_appinfo_h *handle)
     /* Try to get in global packages */
     ret = pkgmgrinfo_appinfo_get_appinfo (appid, handle);
     if (ret != PMINFO_R_OK) {
-        LOGW ("[pkgmgrinfo_appinfo_get_appinfo] appid : '%s', ret : %d", appid, ret);
+        LOGW ("[pkgmgrinfo_appinfo_get_appinfo] appid : '%s', ret : %d, uid : %d", appid, ret, getuid ());
         /* Try to get in user packages */
         ret = pkgmgrinfo_appinfo_get_usr_appinfo (appid, getuid (), handle);
         if (ret != PMINFO_R_OK)
@@ -1254,7 +1254,7 @@ static int _isf_insert_ime_info_by_pkgid(const char *pkgid)
     int ret = -1;
     pkgmgrinfo_pkginfo_h handle = NULL;
     int result = 0;  // 0: not IME, 1: Inserted, 2: Updated (because of the same appid)
-    uid_t uid = getpid ();
+    uid_t uid = getuid ();
     bool user = false;
 
     if (!pkgid) {
@@ -1268,7 +1268,7 @@ static int _isf_insert_ime_info_by_pkgid(const char *pkgid)
         /* Try to get in user packages */
         ret = pkgmgrinfo_pkginfo_get_usr_pkginfo (pkgid, uid, &handle);
         if (ret != PMINFO_R_OK) {
-            LOGW ("Failed to call pkgmgrinfo_pkginfo_get_pkginfo & get_usr_pkginfo(\"%s\",~) returned %d", pkgid, ret);
+            LOGW ("Failed to call pkgmgrinfo_pkginfo_get_pkginfo & get_usr_pkginfo(\"%s\",~) returned %d, uid : %d", pkgid, ret, getuid ());
             return 0;
         }
         else {
@@ -1873,7 +1873,7 @@ int get_ime_app_list_cb (const pkgmgrinfo_appinfo_h handle, void *user_data)
     ret = pkgmgrinfo_pkginfo_get_pkginfo (pkgid, &pkginfo_handle);
     if (ret != PMINFO_R_OK) {
         /* Try to get in user packages */
-        ret = pkgmgrinfo_pkginfo_get_usr_pkginfo (pkgid, getpid (), &pkginfo_handle);
+        ret = pkgmgrinfo_pkginfo_get_usr_pkginfo (pkgid, getuid (), &pkginfo_handle);
     }
 
     if (ret == PMINFO_R_OK && pkginfo_handle) {