diff options
Diffstat (limited to 'src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc')
-rw-r--r-- | src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc index fa3a9ad400..d6ad928bf7 100644 --- a/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc +++ b/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc @@ -134,7 +134,7 @@ void UnsubscribeVehicleDataRequest::Run() { if (is_key_enabled) { ++items_to_unsubscribe; - VehicleDataType key_type = it->second; + mobile_apis::VehicleDataType::eType key_type = it->second; if (!app->IsSubscribedToIVI(key_type)) { ++unsubscribed_items; vi_already_unsubscribed_by_this_app_.insert(key_type); @@ -234,6 +234,7 @@ void UnsubscribeVehicleDataRequest::Run() { ++it) SendHMIRequest(it->func_id, &msg_params, true); #else + StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo); SendHMIRequest(hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData, &msg_params, true); @@ -250,6 +251,15 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) { LOG4CXX_ERROR(logger_, "Received unknown event."); return; } + EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VehicleInfo); + + ApplicationSharedPtr app = + application_manager_.application(CommandRequestImpl::connection_key()); + + if (!app) { + LOG4CXX_ERROR(logger_, "NULL pointer."); + return; + } #ifdef HMI_DBUS_API for (HmiRequests::iterator it = hmi_requests_.begin(); @@ -306,7 +316,7 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) { } SendResponse(any_arg_success, status, NULL, &response_params); if (true == any_arg_success) { - UpdateHash(); + app->UpdateHash(); } } #else |