From: SangYoun Kwak Date: Thu, 16 May 2024 07:25:14 +0000 (+0900) Subject: Fix condition of 'if' to check send_sync correctly X-Git-Tag: accepted/tizen/8.0/unified/20240520.155113^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce151a7a1417c15d9eee892b4a5f53bc1a35f99e;p=platform%2Fcore%2Fsystem%2Fsensord.git 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 --- diff --git a/src/client/sensor_listener.cpp b/src/client/sensor_listener.cpp index 1b8741b3..649a4d4f 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; }