From 97a08a7e37835f0e8619d22c83243bee26a2bff2 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 7 Dec 2018 17:17:43 +0100 Subject: Smalls improvements - Improve robustness reading a BCM socket Adding checks on system calls and remove the initialization of the struct that will hold the received message, not so much needed in that case. - More accurate log message at subscription/unsubscription step whether this is a FD CAN messages or not and if this a subscription or an unsubscription that is requested. - Initialize the full struct of vehicle message to avoid memory warning about conditionnal jump based on uninitialized bytes. - Memleak: Free raw pointer on active diagnostic requests Change-Id: I4bbf4d851c0fa1efdb6fa6034fac3d1dcafa1a73 Signed-off-by: Romain Forlot --- low-can-binding/binding/low-can-cb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'low-can-binding/binding') diff --git a/low-can-binding/binding/low-can-cb.cpp b/low-can-binding/binding/low-can-cb.cpp index daeb5a0b..f200b192 100644 --- a/low-can-binding/binding/low-can-cb.cpp +++ b/low-can-binding/binding/low-can-cb.cpp @@ -263,7 +263,7 @@ static int subscribe_unsubscribe_can_signals(afb_req_t request, {return -1;} rets++; - AFB_DEBUG("signal: %s subscribed", sig->get_name().c_str()); + AFB_DEBUG("%s Signal: %s %ssubscribed", sig->get_message()->is_fd() ? "FD": "", sig->get_name().c_str(), subscribe ? "":"un"); } return rets; } -- cgit 1.2.3-korg