summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Oleynik <AOleynik@luxoft.com>2014-10-02 02:08:53 +0300
committerAndrey Oleynik <AOleynik@luxoft.com>2014-10-02 02:08:53 +0300
commit68f3086411eb40b50b4ec867de5706ae846d9bec (patch)
tree0e9bc6e8d1b79edda9c38959a34467dcaae6aaf8
parente197369323904e8ae7123e6803848b844930da4e (diff)
downloadsdl_core-68f3086411eb40b50b4ec867de5706ae846d9bec.tar.gz
APPLINK-9475. Fixed SDL crash on paired device reconnection, added process stopping if QDB init failed.
-rwxr-xr-xcustomer-specific/pasa/src/appMain/SmartDeviceLinkMainApp.cpp1
-rw-r--r--src/appMain/life_cycle.cc8
2 files changed, 6 insertions, 3 deletions
diff --git a/customer-specific/pasa/src/appMain/SmartDeviceLinkMainApp.cpp b/customer-specific/pasa/src/appMain/SmartDeviceLinkMainApp.cpp
index c21e9b11b1..869a4ab2a0 100755
--- a/customer-specific/pasa/src/appMain/SmartDeviceLinkMainApp.cpp
+++ b/customer-specific/pasa/src/appMain/SmartDeviceLinkMainApp.cpp
@@ -239,6 +239,7 @@ void ApplinkNotificationThreadDelegate::threadMain() {
policy_init.Add(kPolicyInitializationScript);
if (!policy_init.Execute(true)) {
LOG4CXX_ERROR(logger_, "QDB initialization failed.");
+ exit(EXIT_FAILURE);
}
#endif
diff --git a/src/appMain/life_cycle.cc b/src/appMain/life_cycle.cc
index cc7218fad6..8ae94ac50a 100644
--- a/src/appMain/life_cycle.cc
+++ b/src/appMain/life_cycle.cc
@@ -208,14 +208,16 @@ bool LifeCycle::StartComponents() {
#endif // TIME_TESTER
// It's important to initialise TM after setting up listener chain
// [TM -> CH -> AM], otherwise some events from TM could arrive at nowhere
+ app_manager_->set_protocol_handler(protocol_handler_);
+ app_manager_->set_connection_handler(connection_handler_);
+ app_manager_->set_hmi_message_handler(hmi_handler_);
+
transport_manager_->Init();
#ifndef CUSTOMER_PASA
// start transport manager
transport_manager_->Visibility(true);
#endif
- app_manager_->set_protocol_handler(protocol_handler_);
- app_manager_->set_connection_handler(connection_handler_);
- app_manager_->set_hmi_message_handler(hmi_handler_);
+
components_started = true;
return true;
}