To avoid delay issue, the function uses access() function instead of
IPC with AMD.
Change-Id: Ifa096ad1ff66e09d21e4373dd214707681c38a45
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
return AUL_R_EINVAL;
}
- tizen_base::Bundle b {{AUL_K_RPC_PORT, port_name}};
- int ret = AppRequest(RPC_PORT_EXIST, uid)
- .With(b)
- .SetAppId(app_id)
- .SendSimply();
- if (ret < 0) {
- _E("Failed to send request. error(%d)", ret);
- return ret;
- }
+ char* port_path;
+ if (aul_rpc_port_usr_get_path(app_id, port_name, uid, &port_path) != AUL_R_OK)
+ return AUL_R_ENOMEM;
- *exist = (ret == 1) ? true : false;
+ int ret = access(port_path, F_OK);
+ free(port_path);
+ *exist = (ret == 0) ? true : false;
return AUL_R_OK;
}