From 383044cf103dac085463d07beb5f3ab495a08453 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sat, 11 Jan 2014 15:22:26 +0100 Subject: Update Openvpn, fix config parser for trailing whitespace on and options --- src/de/blinkt/openvpn/core/ConfigParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/de/blinkt/openvpn') diff --git a/src/de/blinkt/openvpn/core/ConfigParser.java b/src/de/blinkt/openvpn/core/ConfigParser.java index 7b6b4a91..103c208b 100644 --- a/src/de/blinkt/openvpn/core/ConfigParser.java +++ b/src/de/blinkt/openvpn/core/ConfigParser.java @@ -71,7 +71,7 @@ public class ConfigParser { } private void checkinlinefile(Vector args, BufferedReader br) throws IOException, ConfigParseError { - String arg0 = args.get(0); + String arg0 = args.get(0).trim(); // CHeck for if(arg0.startsWith("<") && arg0.endsWith(">")) { String argname = arg0.substring(1, arg0.length()-1); @@ -83,7 +83,7 @@ public class ConfigParser { if(line==null){ throw new ConfigParseError(String.format("No endtag for starttag <%s> found",argname,argname)); } - if(line.equals(endtag)) + if(line.trim().equals(endtag)) break; else { inlinefile+=line; -- cgit v1.2.3