From b95481ebaafe807bf8606c4b4121de87484ead71 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 8 Sep 2022 20:47:41 +0100 Subject: [PATCH] t/ctl: Ensure connection is initialized properly --- src/xrt/targets/ctl/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/xrt/targets/ctl/main.c b/src/xrt/targets/ctl/main.c index 1c8603756..3bb8de774 100644 --- a/src/xrt/targets/ctl/main.c +++ b/src/xrt/targets/ctl/main.c @@ -183,8 +183,13 @@ main(int argc, char *argv[]) } } - struct ipc_connection ipc_c; + // Initializing the logging level also zeroes the rest of the struct. + struct ipc_connection ipc_c = { + .log_level = U_LOGGING_INFO, + }; + os_mutex_init(&ipc_c.mutex); + int ret = do_connect(&ipc_c); if (ret != 0) { return ret;