aboutsummaryrefslogtreecommitdiffstats
path: root/src/low-can-binding.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-04-04 00:07:16 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-04-11 12:41:42 +0200
commit3aa89d6f3d38ce0513d8698f2ae7b23f8c6edfb9 (patch)
tree4bd8da0fe2aa804e96325e82c261a3950b4bb6e0 /src/low-can-binding.cpp
parent9743bafd76b1ee3ceaf28c726bb94f0779e539a8 (diff)
Fix: make no clients event works with CAN subscription
Is there is no diagnostic message corresponding then do nothing Change-Id: Ib6627b3c10b1b7a0a46d41323a6623efe808a015 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/low-can-binding.cpp')
-rw-r--r--src/low-can-binding.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp
index 8fc143c5..bcbfc2c0 100644
--- a/src/low-can-binding.cpp
+++ b/src/low-can-binding.cpp
@@ -48,8 +48,12 @@ const struct afb_binding_interface *binder_interface;
void on_no_clients(std::string message)
{
DiagnosticRequest* diag_req = configuration_t::instance().get_request_from_diagnostic_message(message);
- active_diagnostic_request_t* adr = configuration_t::instance().get_diagnostic_manager().find_recurring_request(diag_req);
- configuration_t::instance().get_diagnostic_manager().cleanup_request(adr, true);
+ if(diag_req != nullptr)
+ {
+ active_diagnostic_request_t* adr = configuration_t::instance().get_diagnostic_manager().find_recurring_request(diag_req);
+ if( adr != nullptr)
+ configuration_t::instance().get_diagnostic_manager().cleanup_request(adr, true);
+ }
}
///******************************************************************************