summaryrefslogtreecommitdiffstats
path: root/src/low-can-binding.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-07 15:36:18 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:09:03 +0100
commit2258a5b7307cec0fff3bc840c6a5cf72cb0682a3 (patch)
treef622bc19315c2bc2dd8a1a4957c62269e29eac60 /src/low-can-binding.cpp
parentfe846f6698710163af5f2658cc90151259b09d0d (diff)
Fix: typo, and dirty fix to get compiled ftm.
Change-Id: I74042051346a0f0f4de7152e2a668c041edaebde Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/low-can-binding.cpp')
-rw-r--r--src/low-can-binding.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp
index 13452a4c..41a6ab63 100644
--- a/src/low-can-binding.cpp
+++ b/src/low-can-binding.cpp
@@ -82,7 +82,7 @@ static int subscribe_unsubscribe_signal(struct afb_req request, bool subscribe,
std::lock_guard<std::mutex> subscribed_signals_lock(get_subscribed_signals_mutex());
std::map<std::string, struct afb_event>& s = get_subscribed_signals();
- if (s.find(sig) != s.end() && !afb_event_is_valid(s[std::string(sig)]))
+ if (s.find(sig) != s.end() && !afb_event_is_valid(s[sig]))
{
if(!subscribe)
{
@@ -90,12 +90,14 @@ static int subscribe_unsubscribe_signal(struct afb_req request, bool subscribe,
ret = -1;
}
else
+ {
/* Event it isn't valid annymore, recreate it */
ret = create_event_handle(sig, s);
+ }
}
else
{
- /* Event don't exist , so let's create it */
+ /* Event doesn't exist , so let's create it */
struct afb_event empty_event = {nullptr, nullptr};
subscribed_signals[sig] = empty_event;
ret = create_event_handle(sig, s);