Fix aul_rpc_port_prepare_stub API 28/169928/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 12 Feb 2018 06:55:43 +0000 (15:55 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 12 Feb 2018 06:55:43 +0000 (15:55 +0900)
This change is for getting a result.
If a caller process doesn't have permissions to prepare a stub,
the caller gets an error from the amd.

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

index 0fefe02..40a1791 100644 (file)
@@ -57,8 +57,8 @@ API int aul_rpc_port_prepare_stub(const char *appid, const char *port_name)
        }
 
        r = aul_sock_send_bundle(AUL_UTIL_PID, getuid(),
-                       RPC_PORT_PREPARE_STUB, b, AUL_SOCK_NOREPLY);
-       if (r != 0) {
+                       RPC_PORT_PREPARE_STUB, b, AUL_SOCK_QUEUE);
+       if (r < 0) {
                _E("Failed to send request(%d:%s)",
                                RPC_PORT_PREPARE_STUB, appid);
                bundle_free(b);