aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-08-07 15:30:09 -0700
committerScott Jackson <daneren2005@gmail.com>2014-08-07 15:30:09 -0700
commite506efda4e97521888eb11293a8c6c40dfb088da (patch)
treed9f2282b1867a42722c2916903be06e69b6f1ec3 /src
parent0bea42aaa30904b50837fd2f92e82766d940a7e9 (diff)
downloaddsub-e506efda4e97521888eb11293a8c6c40dfb088da.tar.gz
dsub-e506efda4e97521888eb11293a8c6c40dfb088da.tar.bz2
dsub-e506efda4e97521888eb11293a8c6c40dfb088da.zip
Allow comma separated SSID's, as well as a single SSID with a comma in it
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/util/Util.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/util/Util.java b/src/github/daneren2005/dsub/util/Util.java
index 96a2a410..1cd99150 100644
--- a/src/github/daneren2005/dsub/util/Util.java
+++ b/src/github/daneren2005/dsub/util/Util.java
@@ -337,9 +337,10 @@ public final class Util {
String serverUrl = prefs.getString(Constants.PREFERENCES_KEY_SERVER_URL + instance, null);
if(allowAltAddress && Util.isWifiConnected(context)) {
String SSID = prefs.getString(Constants.PREFERENCES_KEY_SERVER_LOCAL_NETWORK_SSID + instance, "");
+ String currentSSID = Util.getSSID(context);
- String[] parts = SSID.split(",");
- if("".equals(SSID) || SSID.equals(Util.getSSID(context)) || Arrays.asList(parts).contains(SSID)) {
+ String[] ssidParts = SSID.split(",");
+ if("".equals(SSID) || SSID.equals(currentSSID) || Arrays.asList(ssidParts).contains(currentSSID)) {
String internalUrl = prefs.getString(Constants.PREFERENCES_KEY_SERVER_INTERNAL_URL + instance, null);
if(internalUrl != null && !"".equals(internalUrl) && !"http://".equals(internalUrl)) {
serverUrl = internalUrl;