From 15dc4de14234c4679e178c0360b20b12b4ff6424 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 2 Jun 2017 02:02:20 +0200 Subject: Change way to validate a subscription object Better to check validity of 2 differents type of signals used and checks that its event is valid. Change-Id: I1435bbe81a43fd80eae049d43b5e37fc8f893074 Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/binding/low-can-cb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CAN-binder/low-can-binding/binding') diff --git a/CAN-binder/low-can-binding/binding/low-can-cb.cpp b/CAN-binder/low-can-binding/binding/low-can-cb.cpp index 9a0c501e..edda2097 100644 --- a/CAN-binder/low-can-binding/binding/low-can-cb.cpp +++ b/CAN-binder/low-can-binding/binding/low-can-cb.cpp @@ -79,7 +79,7 @@ low_can_subscription_t::low_can_subscription_t( low_can_subscription_t&& s) low_can_subscription_t::operator bool() const { - return socket_.socket() != INVALID_SOCKET; + return ((can_signal_ != nullptr || diagnostic_message_ != nullptr) && afb_event_is_valid(event_)); } struct afb_event& low_can_subscription_t::get_event() -- cgit 1.2.3-korg