Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Fix: only one subscription could be made
[apps/agl-service-can-low-level.git]
/
low-can-binding
/
binding
/
low-can-subscription.cpp
diff --git
a/low-can-binding/binding/low-can-subscription.cpp
b/low-can-binding/binding/low-can-subscription.cpp
index
bb48888
..
736e034
100644
(file)
--- 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_);
}