Fix fake launch app async 85/266585/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 15 Nov 2021 23:21:15 +0000 (08:21 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 15 Nov 2021 23:23:54 +0000 (08:23 +0900)
If sending the request is successful, the __fake_launch_app_async()
function has to return the process ID. After sending the launch request,
AMD saves the process information on the pending list until the socket
of the launched application is ready.

Change-Id: I606ce5b59caa2ed01a2229433bd8703a21855cad
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/amd_launch.c

index e379383..b6e94d8 100644 (file)
@@ -823,14 +823,13 @@ static int __fake_launch_app_async(int cmd, int pid, bundle *kb, request_h req)
        int ret;
 
        ret = __send_app_request(pid, target_uid, cmd, -1, kb);
-       if (ret < 0) {
+       if (ret < 0)
                _E("Failed to send request. pid(%d), cmd(%d)", pid, cmd);
-               _request_send_result(req, ret);
-       } else {
-               _request_send_result(req, pid);
-       }
+       else
+               ret = pid;
 
-       _D("cmd(%d), pid(%d)", cmd, pid);
+       _request_send_result(req, ret);
+       _D("cmd(%d), pid(%d), result(%d)", cmd, pid, ret);
        return ret;
 }