diff options
author | Aleksei Lambin <alambin@luxoft.com> | 2015-08-10 16:58:18 +0700 |
---|---|---|
committer | Aleksei Lambin <alambin@luxoft.com> | 2015-08-17 14:35:37 +0700 |
commit | 7733d4508f7229ee03c6fb5b932b2db5cf911ef5 (patch) | |
tree | 0fc3d83ca03a9a2005f30a330bbc0bd728a76c5e /src | |
parent | 592ee4ab60f79daf36cc18f4173165352f641d91 (diff) | |
download | smartdevicelink-7733d4508f7229ee03c6fb5b932b2db5cf911ef5.tar.gz |
Fix Code Review issues.
Diffstat (limited to 'src')
-rw-r--r-- | src/components/application_manager/src/request_controller.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/components/application_manager/src/request_controller.cc b/src/components/application_manager/src/request_controller.cc index b41f6260e..098a55fa7 100644 --- a/src/components/application_manager/src/request_controller.cc +++ b/src/components/application_manager/src/request_controller.cc @@ -35,6 +35,7 @@ #include "application_manager/request_controller.h" #include "application_manager/commands/command_request_impl.h" #include "application_manager/commands/hmi/request_to_hmi.h" +#include "utils/make_shared.h" namespace application_manager { @@ -164,7 +165,7 @@ RequestController::TResult RequestController::addMobileRequest( if (SUCCESS ==result) { // Temporary set timeout to zero. Correct value will be set at the moment // of processing start - in threadMain() - RequestInfoPtr request_info_ptr(new MobileRequestInfo(request, 0)); + RequestInfoPtr request_info_ptr(utils::MakeShared<MobileRequestInfo>(request, 0u)); request_info_ptr->set_hmi_level(hmi_level); AutoLock auto_lock_list(mobile_request_info_list_lock_); mobile_request_info_list_.push_back(request_info_ptr); @@ -263,8 +264,7 @@ void RequestController::terminateWaitingForExecutionAppRequests( LOG4CXX_AUTO_TRACE(logger_); LOG4CXX_DEBUG(logger_, "app_id: " << app_id << "Waiting for execution" << mobile_request_info_list_.size()); - AutoLock - auto_lock(mobile_request_info_list_lock_); + AutoLock auto_lock(mobile_request_info_list_lock_); std::list<RequestInfoPtr>::iterator request_it = mobile_request_info_list_.begin(); while (mobile_request_info_list_.end() != request_it) { @@ -451,13 +451,11 @@ void RequestController::Worker::threadMain() { request_controller_->waiting_for_response_.Add(request_info_ptr); if (0 != timeout_in_seconds) { - LOG4CXX_INFO(logger_, "Execute MobileRequest corr_id = " - << request_info_ptr->requestId() << - " with timeout: " << timeout_in_seconds); request_controller_->UpdateTimer(); } else { - LOG4CXX_INFO(logger_, "Default timeout was set to 0." - "RequestController will not track timeout of this request."); + LOG4CXX_DEBUG(logger_, "Default timeout was set to 0. " + "RequestController will not track timeout " + "of this request."); } AutoUnlock unlock(auto_lock); @@ -465,6 +463,9 @@ void RequestController::Worker::threadMain() { // execute if ((false == request_controller_->IsLowVoltage()) && request_info_ptr->request()->CheckPermissions() && init_res) { + LOG4CXX_DEBUG(logger_, "Execute MobileRequest corr_id = " + << request_info_ptr->requestId() + << " with timeout: " << timeout_in_seconds); request_info_ptr->request()->Run(); } } |