summaryrefslogtreecommitdiffstats
path: root/src/can_reader.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-02-27 21:29:07 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-02-27 21:29:07 +0100
commitf9d6b3b462fa3db5a70e8bd1e1625d35f9e0f21b (patch)
treee272d292c0e0df9803be2ccb66ac43c8f77bfe8e /src/can_reader.cpp
parent7c40ad1076fa608863eb62991d436267dab43dbb (diff)
In class mutex and condition variable except for subscribed_signals map
For now... Change-Id: I133deb39fcd0660064b3b3c2a52f86ad37cb29c2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can_reader.cpp')
-rw-r--r--src/can_reader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/can_reader.cpp b/src/can_reader.cpp
index 7ae981b8..4706d92c 100644
--- a/src/can_reader.cpp
+++ b/src/can_reader.cpp
@@ -30,9 +30,9 @@ void can_reader(can_bus_dev_t &can_bus_dev, can_bus_t& can_bus)
can_message.convert_from_canfd_frame(can_bus_dev.read());
{
- std::lock_guard<std::mutex> can_message_lock(can_message_mutex);
+ std::lock_guard<std::mutex> can_message_lock(can_bus.get_can_message_mutex());
can_bus.push_new_can_message(can_message);
}
- new_can_message.notify_one();
+ can_bus.get_new_can_message().notify_one();
}
} \ No newline at end of file