checkHWFilters arg by reference.

loopback checked first
This commit is contained in:
Ilia
2015-12-27 14:38:00 +00:00
parent 73f0a9074d
commit 7236370409
@@ -232,7 +232,7 @@ class SocketCanIface : public uavcan::ICanIface
*/
loopback = (msg.msg_flags & static_cast<int>(MSG_CONFIRM)) != 0;
if (!checkHWFilters(sockcan_frame) && !loopback)
if (!loopback && !checkHWFilters(sockcan_frame))
{
return 0;
}
@@ -326,7 +326,7 @@ class SocketCanIface : public uavcan::ICanIface
/**
* Returns true if a frame accepted by HW filters
*/
bool checkHWFilters(const ::can_frame frame) const
bool checkHWFilters(const ::can_frame& frame) const
{
if (!hw_filters_container_.empty())
{