From 1125764a8811a51df4a9ffb2fe482259ceea4165 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 20 Mar 2017 09:11:58 +0000 Subject: Make error goes back to the subscribed clients when unsupported. Change-Id: Ic864803c8dffdab3cc9bf5bf281ce032600a732f Signed-off-by: Romain Forlot --- src/diagnostic/diagnostic-manager.cpp | 1 + src/low-can-binding.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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()); -- cgit 1.2.3-korg