Apply to change interface of sessiond API 97/277597/1
authorChanggyu Choi <changyu.choi@samsung.com>
Mon, 11 Jul 2022 03:45:49 +0000 (12:45 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Mon, 11 Jul 2022 03:45:49 +0000 (12:45 +0900)
Sessiond API changed session_user key to char array.
This patch applies the changes.

Change-Id: I4b7bc3c29578a3319afa5ed0558c7b8803ec2d36
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
src/common/utils/file_util.cc

index 5f3dda4..b527bc9 100644 (file)
@@ -743,7 +743,7 @@ bf::path RelativePath(const bf::path& from,
 
 std::vector<std::string> GetLightUserList(uid_t uid) {
   int user_count = 0;
-  int *user_list = nullptr;
+  subsession_user_t* user_list = nullptr;
   int ret = subsession_get_user_list(
       static_cast<int>(uid), &user_list, &user_count);
   if (ret != TIZEN_ERROR_NONE) {
@@ -753,8 +753,9 @@ std::vector<std::string> GetLightUserList(uid_t uid) {
 
   std::vector<std::string> result_list;
   for (int i = 0; i < user_count; i++)
-    result_list.emplace_back(std::to_string(user_list[i]));
+    result_list.emplace_back(user_list[i]);
 
+  std::free(user_list);
   return result_list;
 }