From 74d9e09020b2a025be9dd18774fd4d218b50eeec Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 25 May 2022 12:23:22 +0900 Subject: [PATCH] Fix aul_proc_register() The aul_proc_register() should wait until the result is delivered. Change-Id: I559e4cbcea519b7536884caec79b6d1bc92a22bc Signed-off-by: Hwankyu Jhun --- src/aul_proc.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/aul_proc.cc b/src/aul_proc.cc index 295172f..dd53c69 100644 --- a/src/aul_proc.cc +++ b/src/aul_proc.cc @@ -212,6 +212,13 @@ extern "C" API int aul_proc_register(const char* name, bundle* extra) { return ret; } + int res = aul_sock_recv_result_with_fd(ret); + if (res != 0) { + _E("Failed to receive the result. fd(%d)", res); + close(ret); + return AUL_R_ERROR; + } + context.SetFd(ret); context.SetName(name); if (extra) -- 2.7.4