summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Grover <joeygrover@gmail.com>2016-12-08 15:46:29 -0500
committerJoey Grover <joeygrover@gmail.com>2016-12-08 15:46:29 -0500
commitb05545e0961cc828de8e2f9a8c0714945f672552 (patch)
treef3cdac7b3d177dbfc18b8fc16980e7587cd81c0b
parentb9b7e29a9de424af608719a5ea88f54fe2a651b1 (diff)
downloadsdl_android-b05545e0961cc828de8e2f9a8c0714945f672552.tar.gz
Added RSVP check during force connect to ensure not discconting legacy if not trusted
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlConnection.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlConnection.java b/sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlConnection.java
index c9a5c13f2..3c51b9e7e 100644
--- a/sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlConnection.java
+++ b/sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlConnection.java
@@ -556,12 +556,19 @@ public class SdlConnection implements IProtocolListener, ITransportListener {
if(cachedMultiConfig!=null){
//We are in legacy mode, but just received a force connect. The router service should never be pointing us here if we are truely in legacy mode
ComponentName tempCompName = SdlBroadcastReceiver.consumeQueuedRouterService();
- cachedMultiConfig.setService(tempCompName);
- //We are not connected yet so we should be able to close down
- _transport.disconnect(); //This will force us into the
+ RouterServiceValidator vlad = new RouterServiceValidator(cachedMultiConfig.getContext(),tempCompName);
+ if(vlad.validate()){
+ cachedMultiConfig.setService(tempCompName);
+ //We are not connected yet so we should be able to close down
+ _transport.disconnect(); //This will force us into the
+ }else{
+ //Log.d(TAG, "Router service not trusted during force connect. Ignoring.");
+ return;
+ }
}else{
- Log.i(TAG, "No cached multiplexing config, transport error being called");
- _transport.disconnect();
+ //Log.i(TAG, "No cached multiplexing config, ignoring");
+ //_transport.disconnect();
+ return;
}
Log.w(TAG, "Using own transport, but not connected. Attempting to join multiplexing");
}else{