From 46d396e04947a76756739576a29c8369f8cd0c50 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 30 Mar 2017 17:19:59 +0200 Subject: 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 --- src/can/can-bus.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/can/can-bus.cpp') diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp index ee70744e..33f58fd9 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)); } } } -- cgit 1.2.3-korg