The frame is reported like before but ignored now.
Change-Id: I8314cdb5fa99d950023bf881c72daea2ef9bb935
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
utils::socketcan_bcm_t& s = can_subscription->get_socket();
s >> cm;
- push_n_notify(cm);
+ // Sure we got a valid CAN message ?
+ if(! cm.get_id() == 0 && ! cm.get_length() == 0)
+ {push_n_notify(cm);}
}
- /* check if error or hangup */
+ // check if error or hangup
if ((revents & (EPOLLERR|EPOLLRDHUP|EPOLLHUP)) != 0)
{
sd_event_source_unref(event_source);