aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-12 23:26:25 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:10:41 +0100
commitc54a5d14c001d544a72f3cd27553036e0649f3b1 (patch)
treea0c9a06e09ada98f2f9989290e673795b6ca7628 /src
parent400c8017121c878c98a6ece6cdf22b1288d628f1 (diff)
Fix: wrong location to make the increment because we use
the device after so... This was total crap ! Change-Id: I9bb43c3f75c613a5927f342b3c574871c0eb65bb Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r--src/can/can-bus.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp
index 8edf5bac..d2b51bf2 100644
--- a/src/can/can-bus.cpp
+++ b/src/can/can-bus.cpp
@@ -189,13 +189,13 @@ int can_bus_t::init_can_dev()
can_devices_.push_back(std::make_shared<can_bus_dev_t>(device, i));
if (can_devices_[i]->open() == 0)
{
- i++;
DEBUG(binder_interface, "Start reading thread");
NOTICE(binder_interface, "%s device opened and reading", device.c_str());
can_devices_[i]->start_reading(*this);
}
else
ERROR(binder_interface, "Can't open device %s", device.c_str());
+ i++;
}
NOTICE(binder_interface, "Initialized %d/%d can bus device(s)", i, t);