summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAGaliuzov <AGaliuzov@luxoft.com>2015-09-25 17:00:00 +0300
committerAGaliuzov <AGaliuzov@luxoft.com>2015-09-25 17:00:00 +0300
commit7833169b7db8ebec30201d6d081a5f308244c799 (patch)
tree4284467d2f1fa4ecda5e7406cfb887ec76ddf851
parent7c6cdb9b6474b2a00b80d72a95fa84ef9f033389 (diff)
parent9f001ad95180a5157b8913567102a5808eb2e317 (diff)
downloadsmartdevicelink-7833169b7db8ebec30201d6d081a5f308244c799.tar.gz
Merge pull request #206 from LuxoftSDL/hotfix/Fix_crash_on_getting_connection_key
Fixes crash while trying to get app connection key
-rw-r--r--src/components/application_manager/src/commands/mobile/set_global_properties_request.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc b/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
index 784fa1cbf..1c0948d07 100644
--- a/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
+++ b/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
@@ -333,14 +333,14 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
if (!IsPendingResponseExist()) {
bool result = ((hmi_apis::Common_Result::SUCCESS == ui_result_)
- && (hmi_apis::Common_Result::SUCCESS == tts_result_ ||
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_))
- || ((hmi_apis::Common_Result::SUCCESS == ui_result_ ||
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == ui_result_)
- && (hmi_apis::Common_Result::INVALID_ENUM == tts_result_))
- || ((hmi_apis::Common_Result::INVALID_ENUM == ui_result_ ||
- hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == ui_result_)
- && (hmi_apis::Common_Result::SUCCESS == tts_result_));
+ && (hmi_apis::Common_Result::SUCCESS == tts_result_ ||
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == tts_result_))
+ || ((hmi_apis::Common_Result::SUCCESS == ui_result_ ||
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == ui_result_)
+ && (hmi_apis::Common_Result::INVALID_ENUM == tts_result_))
+ || ((hmi_apis::Common_Result::INVALID_ENUM == ui_result_ ||
+ hmi_apis::Common_Result::UNSUPPORTED_RESOURCE == ui_result_)
+ && (hmi_apis::Common_Result::SUCCESS == tts_result_));
mobile_apis::Result::eType result_code;
const char* return_info = NULL;
@@ -352,19 +352,20 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
std::string("Unsupported phoneme type sent in a prompt").c_str();
} else {
result_code = static_cast<mobile_apis::Result::eType>(
- std::max(ui_result_, tts_result_));
+ std::max(ui_result_, tts_result_));
}
} else {
result_code = static_cast<mobile_apis::Result::eType>(
- std::max(ui_result_, tts_result_));
+ std::max(ui_result_, tts_result_));
}
+ // TODO(AOleynik): APPLINK-15858
+ ApplicationSharedPtr application =
+ ApplicationManagerImpl::instance()->application(connection_key());
SendResponse(result, result_code, return_info,
&(message[strings::msg_params]));
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(connection_key());
if (!application) {
LOG4CXX_DEBUG(logger_, "NULL pointer.");
return;