summaryrefslogtreecommitdiffstats
path: root/low-can-binding/binding/application.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-12-12 10:35:38 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2020-01-09 16:25:36 +0100
commitcc48ab799cf5357f4d573d80c07f6843e50bc8e8 (patch)
tree9fc4f7fe83d8fd97ddf2ad480513029ee13a9451 /low-can-binding/binding/application.cpp
parent528d41049be287fdd273185ab74a8bb2c8d63f5f (diff)
diag_mngr: No diagnostic msg if no diagnostic_bus
Change-Id: I840fc6cc7e9cfd171b03cac508fedb8ece4b976d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/binding/application.cpp')
-rw-r--r--low-can-binding/binding/application.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/low-can-binding/binding/application.cpp b/low-can-binding/binding/application.cpp
index 0b8963cb..c5dfa1b6 100644
--- a/low-can-binding/binding/application.cpp
+++ b/low-can-binding/binding/application.cpp
@@ -71,10 +71,13 @@ int application_t::add_message_set(std::shared_ptr<message_set_t> new_message_se
return -1;
}
- for(auto new_diag_msg : new_message_set->get_diagnostic_messages())
+ if(diagnostic_manager_.is_initialized())
{
- if(old_msg_set->add_diagnostic_message(new_diag_msg) < 0)
- return -1;
+ for(auto new_diag_msg : new_message_set->get_diagnostic_messages())
+ {
+ if(old_msg_set->add_diagnostic_message(new_diag_msg) < 0)
+ return -1;
+ }
}
return 0;
}