summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-07 01:29:59 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-07 01:29:59 +0200
commit4eb1cc0d69804337ac9e35dea6cc2e22c0fc76c6 (patch)
tree11e8c103d6aaa53a80765be5ca01cc666d7d86c9 /CAN-binder/low-can-binding
parent89b22975575deba2aee277ea03867238f963c3aa (diff)
Fix: exception unsubscribe all at start
When unsubscribing but no diagnostic subscription made there is an exception when cleaning empty requests vector. Change-Id: I40bdd01969fd1a1c6fecb0a438c46d0df584de83 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding')
-rw-r--r--CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp
index ac91ae5..7dab749 100644
--- a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp
+++ b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp
@@ -202,7 +202,7 @@ void diagnostic_manager_t::cancel_request(active_diagnostic_request_t* entry)
/// @param[in] force - Force the cleaning or not ?
void diagnostic_manager_t::cleanup_request(active_diagnostic_request_t* entry, bool force)
{
- if((force || (entry != nullptr && entry->response_received())))
+ if(entry != nullptr && (force || entry->response_received()))
{
char request_string[128] = {0};
diagnostic_request_to_string(&entry->get_handle()->request,