You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I am using setsockopt function to subscribe to the messages I want tor receive on the CAN. The function is as follows:
And the code runs, I am receiving messages I want. After some time, I want to tell socket CAN "stop receiving those messages". I tried implementing it with the following function:
if (optname==CAN_RAW_FILTER&&optlen!=sizeof(structcan_filter)) {
and few lines below for details.
If giving NULL option and/or 0 length would mean that the filter needs to be unregistered, then these checks should be changed. Would you be able to send patches for these?
Setting optval to NULL, and optlen to 0 is exactly how I use it on Linux. The following is an excerpt from my Linux code:
And it works just like I want it to. This is part of the CAN_Open function, where I want to explicitly set that no messages are to be received before instructed to do so.
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
Is your feature request related to a problem? Please describe.
I am using setsockopt function to subscribe to the messages I want tor receive on the CAN. The function is as follows:
And the code runs, I am receiving messages I want. After some time, I want to tell socket CAN "stop receiving those messages". I tried implementing it with the following function:
setsockopt(socket_id, SOL_CAN_RAW, CAN_RAW_FILTER, NULL,0);
But the function call fails, with a reason: Invalid argument. So, my question is: how can I tell socket CAN to stop receiving messages on a socket?
The text was updated successfully, but these errors were encountered: