Make sure we don't remember non-switch status if only one device is connected. Also increase the timeout to get USB personalities seen on some devices. RCL_2_4
authorChad Peckham <chad.peckham@nokia.com>
Thu, 04 Mar 2010 13:41:15 -0600
branchRCL_2_4
changeset 1080 43348591c4a0
parent 1079 8915e650957c
child 1084 328f2d956cbe
Make sure we don't remember non-switch status if only one device is connected. Also increase the timeout to get USB personalities seen on some devices.
connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/PCCSConnection.java
--- a/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/PCCSConnection.java	Thu Mar 04 13:30:22 2010 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/PCCSConnection.java	Thu Mar 04 13:41:15 2010 -0600
@@ -549,6 +549,11 @@
 			return goodConnections;
 		}
 		
+		if (deviceList.length == 1) {
+			// forget all non switched devices
+			forgetAllNoSwitchConnectionsNotInCurrentList(null);
+		}
+
 		Collection<DeviceUSBPersonalityInfo> personalityList = null;
 		if (numUSBDevicesExpected > 0) {
 			int attempt = 1;
@@ -556,7 +561,7 @@
 				personalityList = getAllDeviceUSBPersonalities();
 				if (personalityList == null || personalityList.size() < numUSBDevicesExpected) {
 					if (DEBUG) System.out.printf("Error %d getting USB personalities: %d of %d total\n", attempt, (personalityList != null) ? personalityList.size() : 0, numUSBDevicesExpected); //$NON-NLS-1$
-					if (attempt > 5) {
+					if (attempt > 10) {
 						break; // bomb - leave UPAPI open, we need it later
 					}
 					attempt++;