aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/binding/low-can-cb.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-11-26 16:18:52 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-11-28 16:11:47 +0100
commit5339613a41e250d3153502dba29a8305ffb83381 (patch)
tree4dc94e6c4053c45be21c2a604ac8b2d08115d03b /low-can-binding/binding/low-can-cb.cpp
parentddfe573eeff26161b590ac9a83eb044c636f8f2f (diff)
Fix: only one subscription could be made
Only one subscription could be made and then only one subscriber could receive associated events. As the relationship between events and subscriber is not 1-1 but 1-N, so this was the mistake. Now 1 event is created for N subscriber where before there was 1 event for 1 subscriber and subsequent subscribers could not receive same events than the ones already subscribed. Bug-AGL: SPEC-2726 Bug-AGL: SPEC-2976 Change-Id: I4e4a80ac9f9b6b4c6b006108ee55f355a7c1e377 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/binding/low-can-cb.cpp')
-rw-r--r--low-can-binding/binding/low-can-cb.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/low-can-binding/binding/low-can-cb.cpp b/low-can-binding/binding/low-can-cb.cpp
index 5fdd961e..2b630845 100644
--- a/low-can-binding/binding/low-can-cb.cpp
+++ b/low-can-binding/binding/low-can-cb.cpp
@@ -151,8 +151,7 @@ static int subscribe_unsubscribe_signal(afb_req_t request,
}
// Event doesn't exist , so let's create it
- if (! subscription_exists &&
- (ret = can_subscription->subscribe(request)) < 0)
+ if ((ret = can_subscription->subscribe(request)) < 0)
return ret;
if(! subscription_exists)