mirror of
https://github.com/apache/nuttx.git
synced 2026-08-07 13:37:18 +00:00
socketcan : fixed CAN ID cast error
args can_id for recv_filter doesn't work properly Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
This commit is contained in:
parent
5bc32727b4
commit
bcfb4decb0
1 changed files with 4 additions and 1 deletions
|
|
@ -344,7 +344,10 @@ static uint16_t can_recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
|||
* when is valid then complete the read action.
|
||||
*/
|
||||
#ifdef CONFIG_NET_CANPROTO_OPTIONS
|
||||
if (can_recv_filter(conn, (canid_t) *dev->d_appdata) == 0)
|
||||
canid_t can_id;
|
||||
memcpy(&can_id, dev->d_appdata, sizeof(canid_t));
|
||||
|
||||
if (can_recv_filter(conn, can_id) == 0)
|
||||
{
|
||||
flags &= ~CAN_NEWDATA;
|
||||
return flags;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue