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 <romain.forlot@iot.bzh>
low_can_subscription_t::operator bool() const
{
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()
}
struct afb_event& low_can_subscription_t::get_event()