struct canfilt_t canfilt; /* filter for received messages */
if (!option_open_once) {
- /* Open can driver */
- if(vca_open_handle(&vcah, option_device, NULL, 0) < 0) {
+ /* Open the CAN driver and disable (D) reception of
+ * all messages until we setup a filter below. */
+ if(vca_open_handle(&vcah, option_device, "D", 0) < 0) {
perror("open");
fprintf(stderr, "Error opening %s (for id %d)\n", option_device, ping_id);
exit(EXIT_CANNOT_OPEN);
struct canfilt_t canfilt; /* filter for received messages */
if (!option_open_once) {
- /* Open the CAN driver */
- if(vca_open_handle(&vcah, option_device, NULL, 0) < 0) {
+ /* Open the CAN driver and disable (D) reception of
+ * all messages until we setup a filter below. */
+ if(vca_open_handle(&vcah, option_device, "D", 0) < 0) {
perror("open");
printf("Error opening %s (for id %d)\n", option_device, ping_id);
exit(EXIT_CANNOT_OPEN);