From 08a4337bf62b7b0671c75f8b3d34a803384ec364 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 12 Aug 2019 17:58:50 +0200 Subject: 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 Change-Id: I4e4a80ac9f9b6b4c6b006108ee55f355a7c1e377 Signed-off-by: Romain Forlot --- low-can-binding/binding/low-can-cb.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'low-can-binding/binding/low-can-cb.cpp') 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) -- cgit 1.2.3-korg