diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-02-21 12:58:09 +0000 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-02-21 12:58:09 +0000 |
commit | b157cc6c5942ed0dfae672d2d3e32e0d7c6cb2ad (patch) | |
tree | 625f28c7693080a061855797dd1a6e94ee5168cd /src/low-can-binding.cpp | |
parent | 94d2332db42c506a275a71f6741a8cddfa9c0d6f (diff) |
Fix: threads launching with wrong arguments
Fix: wrong type identifier to returned sendto
function
Change-Id: I33bcb84211c665720422573b04b32ca71e13d3e5
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/low-can-binding.cpp')
-rw-r--r-- | src/low-can-binding.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp index aaa9e54a..4e58dd40 100644 --- a/src/low-can-binding.cpp +++ b/src/low-can-binding.cpp @@ -34,6 +34,7 @@ static int subscribe_unsubscribe_signal(struct afb_req request, bool subscribe, { int ret; + // TODO: lock the subscribed_signals when insert/remove const auto& ss_i = subscribed_signals.find(sig.genericName); if (ss_i != subscribed_signals.end()) { @@ -78,15 +79,15 @@ static int subscribe_unsubscribe_signal(struct afb_req request, bool subscribe, static int subscribe_unsubscribe_signals(struct afb_req request, bool subscribe, const std::vector<CanSignal>& signals) { - int ret; + int ret = 0; - // TODO: lock the subscribed_signals when insert/remove for(const auto& signal_i : signals) { ret = subscribe_unsubscribe_signal(request, subscribe, signal_i); if(ret == 0) return ret; } + return ret; } static int subscribe_unsubscribe_all(struct afb_req request, bool subscribe) |