Before sending the request to amd, launchpad checks whether the socket
exists or not. If it does not exist, launchpad does not connect to amd.
Change-Id: I1912d5f477843d73fc68e4d0d458dbd8d6f51528
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
int Util::SendCmdToAmd(enum AmdCmd cmd, bundle* request, int opt) {
try {
std::string endpoint = "/run/aul/daemons/.amd-sock";
+ if (access(endpoint.c_str(), F_OK) != 0) return -1;
+
ClientSocket socket;
socket.Connect(endpoint);
socket.SetReceiveBufferSize(Socket::kSocketMaxBufferSize);