From bcac379cf52f6e72d03807bee6e52a362df64a1b Mon Sep 17 00:00:00 2001 From: Mateo de Mayo Date: Sat, 21 May 2022 23:57:55 -0300 Subject: [PATCH] ipc: Init connection mutex --- src/xrt/ipc/client/ipc_client_instance.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xrt/ipc/client/ipc_client_instance.c b/src/xrt/ipc/client/ipc_client_instance.c index 699243f72..77f24a6a2 100644 --- a/src/xrt/ipc/client/ipc_client_instance.c +++ b/src/xrt/ipc/client/ipc_client_instance.c @@ -303,6 +303,8 @@ ipc_instance_create(struct xrt_instance_info *i_info, struct xrt_instance **out_ ii->ipc_c.imc.socket_fd = -1; ii->ipc_c.ism_handle = XRT_SHMEM_HANDLE_INVALID; + os_mutex_init(&ii->ipc_c.mutex); + if (!ipc_connect(&ii->ipc_c)) { IPC_ERROR((&ii->ipc_c), "Failed to connect to monado service process\n\n" @@ -398,7 +400,5 @@ ipc_instance_create(struct xrt_instance_info *i_info, struct xrt_instance **out_ *out_xinst = &ii->base; - os_mutex_init(&ii->ipc_c.mutex); - return XRT_SUCCESS; }