summaryrefslogtreecommitdiffstats
path: root/src/can
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-30 17:19:59 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-04-11 12:41:42 +0200
commit46d396e04947a76756739576a29c8369f8cd0c50 (patch)
tree6f27b769b2880c291d7b2704c414e35c22c1b85d /src/can
parent34d84de6e8b825ced7d476672035c0b94856862e (diff)
Handle cancel active diag requet when there are no more subscribers
When push events if there is no more subscribers to that event then call a function that will cleanup that request from diagnostic manager queue. Change-Id: I8153701074453444a5bba6f1374401bdf230f7e6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can')
-rw-r--r--src/can/can-bus.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp
index ee70744..33f58fd 100644
--- a/src/can/can-bus.cpp
+++ b/src/can/can-bus.cpp
@@ -185,7 +185,8 @@ void can_bus_t::can_event_push()
{
jo = json_object_new_object();
jsonify_simple(s_message, jo);
- afb_event_push(s[std::string(s_message.name)], jo);
+ if(afb_event_push(s[std::string(s_message.name)], jo) == 0)
+ on_no_clients(std::string(s_message.name));
}
}
}