Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Use the private method instead of direct C syscall.
[apps/agl-service-can-low-level.git]
/
CAN-binder
/
low-can-binding
/
utils
/
socketcan.cpp
diff --git
a/CAN-binder/low-can-binding/utils/socketcan.cpp
b/CAN-binder/low-can-binding/utils/socketcan.cpp
index
841c7ba
..
0f2e01f
100644
(file)
--- a/
CAN-binder/low-can-binding/utils/socketcan.cpp
+++ b/
CAN-binder/low-can-binding/utils/socketcan.cpp
@@
-113,7
+113,7
@@
namespace utils
close();
struct ifreq ifr;
close();
struct ifreq ifr;
- socket_ =
::socket
(PF_CAN, SOCK_DGRAM, CAN_BCM);
+ socket_ =
open
(PF_CAN, SOCK_DGRAM, CAN_BCM);
// Attempts to open a socket to CAN bus
::strcpy(ifr.ifr_name, device_name.c_str());
// Attempts to open a socket to CAN bus
::strcpy(ifr.ifr_name, device_name.c_str());