summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/binding
diff options
context:
space:
mode:
Diffstat (limited to 'CAN-binder/low-can-binding/binding')
-rw-r--r--CAN-binder/low-can-binding/binding/low-can-cb.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/CAN-binder/low-can-binding/binding/low-can-cb.cpp b/CAN-binder/low-can-binding/binding/low-can-cb.cpp
index fbe6e196..bc94eedf 100644
--- a/CAN-binder/low-can-binding/binding/low-can-cb.cpp
+++ b/CAN-binder/low-can-binding/binding/low-can-cb.cpp
@@ -242,13 +242,13 @@ static int subscribe_unsubscribe_can_signals(struct afb_req request, bool subscr
can_subscription = std::make_shared<low_can_subscription_t>(low_can_subscription_t(event_filter));
if(can_subscription->create_rx_filter(sig) < 0)
{return -1;}
+ if(add_to_event_loop(can_subscription) < 0)
+ {return -1;}
}
if(subscribe_unsubscribe_signal(request, subscribe, can_subscription, s) < 0)
{return -1;}
- if(add_to_event_loop(can_subscription) < 0)
- {return -1;}
rets++;
DEBUG(binder_interface, "%s: signal: %s subscribed", __FUNCTION__, sig->get_name().c_str());
}