From f9f69298e7d0b5e4258ea27095f50f9da7c6ff9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 21 Nov 2013 21:41:58 +0100 Subject: OpenVPN notification contains location. Instead of plain domain, we're printing a new variable stored in vpnprofile (parsed in ConfigParser): location. I'm substituing "__" by ", ", but I'm not uppercasing anything. We rely on the raw data from eip-service.json. --- src/se/leap/bitmaskclient/EIP.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/se/leap/bitmaskclient') diff --git a/src/se/leap/bitmaskclient/EIP.java b/src/se/leap/bitmaskclient/EIP.java index f9384ff6..22f7558d 100644 --- a/src/se/leap/bitmaskclient/EIP.java +++ b/src/se/leap/bitmaskclient/EIP.java @@ -431,6 +431,7 @@ public final class EIP extends IntentService { String ports = "ports"; String protos = "protocols"; String capabilities = "capabilities"; + String location = "location"; Vector arg = new Vector(); Vector> args = new Vector>(); @@ -457,7 +458,7 @@ public final class EIP extends IntentService { } try { - arg.add("remote"); + arg.add(remote); arg.add(mGateway.getString(remote)); } catch (JSONException e) { // TODO Auto-generated catch block @@ -467,7 +468,19 @@ public final class EIP extends IntentService { options.put("remote", (Vector>) args.clone() ); arg.clear(); args.clear(); + + try { + arg.add(location); + arg.add(mGateway.getString(location)); + } catch (JSONException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + args.add((Vector) arg.clone()); + options.put("location", (Vector>) args.clone() ); + arg.clear(); + args.clear(); JSONArray protocolsJSON = null; arg.add("proto"); try { -- cgit v1.2.3