diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-20 09:11:58 +0000 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-20 09:11:58 +0000 |
commit | 1125764a8811a51df4a9ffb2fe482259ceea4165 (patch) | |
tree | 69403bc0ee05d0f495f76dd9be6a6661e9517e81 /src | |
parent | c0fd6e1982353d056c26a292186ef0df315adde3 (diff) |
Make error goes back to the subscribed clients when unsupported.
Change-Id: Ic864803c8dffdab3cc9bf5bf281ce032600a732f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r-- | src/diagnostic/diagnostic-manager.cpp | 1 | ||||
-rw-r--r-- | src/low-can-binding.cpp | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/src/diagnostic/diagnostic-manager.cpp b/src/diagnostic/diagnostic-manager.cpp index 017601c9..cf84ecc6 100644 --- a/src/diagnostic/diagnostic-manager.cpp +++ b/src/diagnostic/diagnostic-manager.cpp @@ -518,6 +518,7 @@ openxc_VehicleMessage diagnostic_manager_t::relay_diagnostic_response(active_dia found_signals.front()->set_supported(false); cleanup_request(adr, true); NOTICE(binder_interface, "relay_diagnostic_response: PID not supported or ill formed. Please unsubscribe from it. Error code : %d", response.negative_response_code); + message = build_VehicleMessage(build_SimpleMessage(adr->get_name(), build_DynamicField("This PID isn't supported by your vehicle."))); } if(adr->get_callback() != nullptr) diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp index 45213d91..ed1aa34c 100644 --- a/src/low-can-binding.cpp +++ b/src/low-can-binding.cpp @@ -147,7 +147,6 @@ static int subscribe_unsubscribe_signals(struct afb_req request, bool subscribe, } else { - found.front()->set_supported(false); configuration_t::instance().get_diagnostic_manager().cleanup_request( configuration_t::instance().get_diagnostic_manager().find_recurring_request(diag_req), true); DEBUG(binder_interface, "Signal: %s isn't supported. Canceling operation.", sig.c_str()); |