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/openvpn/ConfigParser.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/se/leap/openvpn/ConfigParser.java') diff --git a/src/se/leap/openvpn/ConfigParser.java b/src/se/leap/openvpn/ConfigParser.java index 3d369fa6..36585d29 100644 --- a/src/se/leap/openvpn/ConfigParser.java +++ b/src/se/leap/openvpn/ConfigParser.java @@ -355,6 +355,12 @@ public class ConfigParser { np.mServerName = remote.get(1); } } + + // Parse remote config + Vector location = getOption("location",1,2); + if(location != null && location.size() == 2){ + np.mLocation = location.get(1).replace("__", ", "); + } Vector> dhcpoptions = getAllOption("dhcp-option", 2, 2); if(dhcpoptions!=null) { -- cgit v1.2.3