From d5e9dfcfab8971e9f055bc7cd9c6228646d6007a Mon Sep 17 00:00:00 2001 From: SangYoun Kwak Date: Thu, 16 May 2024 16:25:14 +0900 Subject: [PATCH] Fix condition of 'if' to check send_sync correctly Condition of if statement which checking if send_sync was successful or not was not should be reversed. (send_sync returns true if it was successful, so '!' should be added) Change-Id: I2cf48959264e5415dafe67ac651830f0ff2d7611 Signed-off-by: SangYoun Kwak --- src/client/sensor_listener.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/sensor_listener.cpp b/src/client/sensor_listener.cpp index 1b8741b..649a4d4 100644 --- a/src/client/sensor_listener.cpp +++ b/src/client/sensor_listener.cpp @@ -251,7 +251,7 @@ bool sensor_listener::connect(void) msg.set_type(CMD_LISTENER_CONNECT); msg.enclose((const char *)&buf, sizeof(buf)); - if (m_evt_channel->send_sync(msg)) { + if (!m_evt_channel->send_sync(msg)) { _E("Failed to send message"); return false; } -- 2.7.4