diff options
Diffstat (limited to 'low-can-binding/binding/low-can-subscription.cpp')
-rw-r--r-- | low-can-binding/binding/low-can-subscription.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/low-can-binding/binding/low-can-subscription.cpp b/low-can-binding/binding/low-can-subscription.cpp index bb488887..736e034a 100644 --- a/low-can-binding/binding/low-can-subscription.cpp +++ b/low-can-binding/binding/low-can-subscription.cpp @@ -95,8 +95,13 @@ int low_can_subscription_t::set_event() */ int low_can_subscription_t::subscribe(afb_req_t request) { - if(set_event() < 0) - return -1; + if(! afb_event_is_valid(event_)) + { + if(set_event() < 0) + { + return -1; + } + } return afb_req_subscribe(request, event_); } |