summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/can/can-bus.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-04-20 17:38:01 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-04-20 17:38:01 +0200
commit0a27582743cb7b4ad191adea4eefeda01d179896 (patch)
tree9187fa3ee5ca4351fac72b8bceb63760769f0f9c /CAN-binder/low-can-binding/can/can-bus.cpp
parentf546e121079088920e2a3f64bc054afa05ff945f (diff)
Use same function to open BCM and RAW CAN sockets
Using one a another socket type is made using a boolean. Change-Id: I0445c8550f289d1e0020f6496c638bc95e8db443 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/can/can-bus.cpp')
-rw-r--r--CAN-binder/low-can-binding/can/can-bus.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/CAN-binder/low-can-binding/can/can-bus.cpp b/CAN-binder/low-can-binding/can/can-bus.cpp
index 90d4c74..4775b4f 100644
--- a/CAN-binder/low-can-binding/can/can-bus.cpp
+++ b/CAN-binder/low-can-binding/can/can-bus.cpp
@@ -237,7 +237,7 @@ int can_bus_t::init_can_dev()
for(const auto& device : devices_name)
{
can_bus_t::can_devices_[device] = std::make_shared<can_bus_dev_t>(device, i);
- if (can_bus_t::can_devices_[device]->open_raw() == 0)
+ if (can_bus_t::can_devices_[device]->open(true) >= 0)
{
DEBUG(binder_interface, "Start reading thread");
NOTICE(binder_interface, "%s device opened and reading", device.c_str());