summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacobkeeler <jacob.keeler@livioradio.com>2019-03-06 14:56:36 -0500
committerjacobkeeler <jacob.keeler@livioradio.com>2019-03-06 14:56:36 -0500
commit82f77e91d31a8a5507c8cdd2388e24642e1c846f (patch)
tree1257c91671fdfd83fbc4a1178f4013f47f438d62
parent2cb0d5758bbc733770b08e1495f03f64205064ea (diff)
downloadsdl_core-82f77e91d31a8a5507c8cdd2388e24642e1c846f.tar.gz
Add passthrough timeout to provider requests
-rw-r--r--src/appMain/smartDeviceLink.ini15
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc2
-rw-r--r--src/components/application_manager/src/commands/command_request_impl.cc4
-rw-r--r--src/components/application_manager/src/commands/request_from_hmi.cc7
4 files changed, 17 insertions, 11 deletions
diff --git a/src/appMain/smartDeviceLink.ini b/src/appMain/smartDeviceLink.ini
index ee67e6f018..54c2395c47 100644
--- a/src/appMain/smartDeviceLink.ini
+++ b/src/appMain/smartDeviceLink.ini
@@ -359,16 +359,6 @@ EnableAppLaunchIOS = true
;SecondaryTransportForUSB =
;SecondaryTransportForWiFi =
-[AppServices]
-; The ID to pass to app service publishers when sending a PerformAppServiceInteraction request
-;CoresOriginId = "sdl_core"
-
-; Services that exist on the module. Values are of AppServiceType in RPC Spec. These services will be used as default and app services will only become primary service publisher with direct user interaction. These services will also be a fallback if no app service publisher is registered with the system of that type.
-;EmbeddedServices = MEDIA, WEATHER, NAVIGATION, VOICE_ASSISTANT, COMMUNICATION_VOIP, MESSAGING, TTS
-
-; Additional time added to RPC timeout when passing through to App service
-RpcPassThroughTimeout = 10000
-
[ServicesMap]
; A matrix to specify which service is allowed on which transports. The transports are listed
; in preferred order. If a transport is not listed, then the service is not allowed
@@ -385,4 +375,7 @@ RpcPassThroughTimeout = 10000
HMIOriginID = "HMI_ID"
; Services that exist on the module. Values are of AppServiceType in RPC Spec. These services will be used as default and app services will only become primary service publisher with direct user interaction. These services will also be a fallback if no app service publisher is registered with the system of that type.
-EmbeddedServices = MEDIA, WEATHER, NAVIGATION, VOICE_ASSISTANT
+EmbeddedServices = MEDIA, WEATHER, NAVIGATION
+
+; Additional time added to RPC timeout when passing through to App service
+RpcPassThroughTimeout = 10000 \ No newline at end of file
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc
index d21c413b29..9623cffd36 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/perform_app_service_interaction_request.cc
@@ -94,6 +94,8 @@ void PerformAppServiceInteractionRequest::Run() {
// service
smart_objects::SmartObject request_params;
request_params[strings::service_id] = service_id;
+ application_manager_.IncreaseForwardedRequestTimeout(connection_key(),
+ correlation_id());
SendHMIRequest(hmi_apis::FunctionID::AppService_GetActiveServiceConsent,
&request_params,
true);
diff --git a/src/components/application_manager/src/commands/command_request_impl.cc b/src/components/application_manager/src/commands/command_request_impl.cc
index c6dbe6972f..fcca87b235 100644
--- a/src/components/application_manager/src/commands/command_request_impl.cc
+++ b/src/components/application_manager/src/commands/command_request_impl.cc
@@ -441,6 +441,8 @@ void CommandRequestImpl::SendProviderRequest(
if (hmi_destination) {
LOG4CXX_DEBUG(logger_, "Sending Request to HMI Provider");
+ application_manager_.IncreaseForwardedRequestTimeout(connection_key(),
+ correlation_id());
SendHMIRequest(hmi_function_id, &(*msg)[strings::msg_params], use_events);
return;
}
@@ -468,6 +470,8 @@ void CommandRequestImpl::SendProviderRequest(
request[strings::msg_params] = (*msg)[strings::msg_params];
request[strings::params][strings::connection_key] = app->app_id();
+ application_manager_.IncreaseForwardedRequestTimeout(connection_key(),
+ correlation_id());
SendMobileRequest(mobile_function_id, new_msg, use_events);
}
diff --git a/src/components/application_manager/src/commands/request_from_hmi.cc b/src/components/application_manager/src/commands/request_from_hmi.cc
index 823e93cb5e..86473f5fca 100644
--- a/src/components/application_manager/src/commands/request_from_hmi.cc
+++ b/src/components/application_manager/src/commands/request_from_hmi.cc
@@ -32,6 +32,7 @@
#include "application_manager/commands/request_from_hmi.h"
#include "application_manager/application_manager.h"
+#include "application_manager/request_info.h"
#include "application_manager/rpc_service.h"
#include "utils/helpers.h"
@@ -183,6 +184,9 @@ void RequestFromHMI::SendProviderRequest(
if (hmi_destination) {
LOG4CXX_DEBUG(logger_, "Sending Request to HMI Provider");
+ application_manager_.IncreaseForwardedRequestTimeout(
+ application_manager::request_controller::RequestInfo::HmiConnectoinKey,
+ correlation_id());
SendHMIRequest(hmi_function_id, &(*msg)[strings::msg_params], use_events);
return;
}
@@ -193,6 +197,9 @@ void RequestFromHMI::SendProviderRequest(
}
LOG4CXX_DEBUG(logger_, "Sending Request to Mobile Provider");
+ application_manager_.IncreaseForwardedRequestTimeout(
+ application_manager::request_controller::RequestInfo::HmiConnectoinKey,
+ correlation_id());
SendMobileRequest(
mobile_function_id, app, &(*msg)[strings::msg_params], use_events);
}