diff options
author | Parménides GV <parmegv@sdf.org> | 2013-07-11 18:58:58 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-07-11 18:58:58 +0200 |
commit | 872bcd1e5044b3b0119ae8ff2eff5509c5ee3274 (patch) | |
tree | 3d6d0254430cb47c3759e0632a2b6858e28aa8e3 /src/se/leap | |
parent | 1f7d1334006e816c12f0d1915fcfdc697636dfec (diff) | |
parent | 7c2ec16d1ec98640dcc9e070f2b9361f68df6f02 (diff) |
Merge branch 'hotfix/exception-parsing-gateways' into develop
Diffstat (limited to 'src/se/leap')
-rw-r--r-- | src/se/leap/leapclient/EIP.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/se/leap/leapclient/EIP.java b/src/se/leap/leapclient/EIP.java index 426f4359..b86a2a4a 100644 --- a/src/se/leap/leapclient/EIP.java +++ b/src/se/leap/leapclient/EIP.java @@ -302,7 +302,6 @@ public final class EIP extends IntentService { ProfileManager vpl = ProfileManager.getInstance(context); try { - if ( name == "first" ) { name = vpl.getProfiles().iterator().next().mName; } @@ -330,9 +329,11 @@ public final class EIP extends IntentService { // Currently deletes VpnProfile for host, if there already is one, and builds new ProfileManager vpl = ProfileManager.getInstance(context); Collection<VpnProfile> profiles = vpl.getProfiles(); - for (VpnProfile p : profiles){ + for (Iterator<VpnProfile> it = profiles.iterator(); it.hasNext(); ){ + VpnProfile p = it.next(); try { if ( p.mName.contains( gateway.getString("host") ) ) + it.remove(); vpl.removeProfile(context, p); } catch (JSONException e) { // TODO Auto-generated catch block |