Fix aul_proc_register() 48/275448/1
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 25 May 2022 03:23:22 +0000 (12:23 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 25 May 2022 03:23:22 +0000 (12:23 +0900)
The aul_proc_register() should wait until the result is delivered.

Change-Id: I559e4cbcea519b7536884caec79b6d1bc92a22bc
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/aul_proc.cc

index 295172f..dd53c69 100644 (file)
@@ -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)