summaryrefslogtreecommitdiffstats
path: root/src/can_event_push.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_event_push.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_event_push.cpp')
-rw-r--r--src/can_event_push.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/can_event_push.cpp b/src/can_event_push.cpp
index fc403ee1..b3719734 100644
--- a/src/can_event_push.cpp
+++ b/src/can_event_push.cpp
@@ -33,15 +33,15 @@ void can_event_push(can_bus_t& can_bus)
while(can_bus.is_pushing())
{
{
- std::unique_lock<std::mutex> decoded_can_message_lock(decoded_can_message_mutex);
- new_decoded_can_message.wait(decoded_can_message_lock);
+ std::unique_lock<std::mutex> decoded_can_message_lock(can_bus.get_decoded_can_message_mutex());
+ can_bus.get_new_decoded_can_message().wait(decoded_can_message_lock);
v_message = can_bus.next_vehicle_message();
}
s_message = get_simple_message(v_message);
{
- std::lock_guard<std::mutex> subscribed_signals_lock(subscribed_signals_mutex);
+ std::lock_guard<std::mutex> subscribed_signals_lock(get_subscribed_signals_mutex());
std::map<std::string, struct afb_event> subscribed_signals = get_subscribed_signals();
const auto& it_event = subscribed_signals.find(s_message.name);
if(it_event != subscribed_signals.end() && afb_event_is_valid(it_event->second))