Merge d8bbacfb47 into c5fd57df34
commit
331ef319d9
|
|
@ -102,6 +102,7 @@ int main(int argc, char **argv)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bzero(&addr,sizeof(struct sockaddr_can));
|
||||||
addr.can_family = AF_CAN;
|
addr.can_family = AF_CAN;
|
||||||
addr.can_ifindex = ifr.ifr_ifindex;
|
addr.can_ifindex = ifr.ifr_ifindex;
|
||||||
|
|
||||||
|
|
@ -135,7 +136,7 @@ int main(int argc, char **argv)
|
||||||
/* this reason we can remove the receive list in the Kernel to save a */
|
/* this reason we can remove the receive list in the Kernel to save a */
|
||||||
/* little (really a very little!) CPU usage. */
|
/* little (really a very little!) CPU usage. */
|
||||||
setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER, NULL, 0);
|
setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER, NULL, 0);
|
||||||
|
|
||||||
if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
|
if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
|
||||||
perror("bind");
|
perror("bind");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue