diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-05-24 11:11:45 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-05-24 11:11:45 +0200 |
commit | eaef7350ff03e4447962c06262ca1831cc06cab0 (patch) | |
tree | ff74a9cc3cdae4149703212c68fc307674a8b5a3 /src | |
parent | cf7c06399618952da0b40d923da81651e546e83d (diff) |
Add more diagnostic messages for management password queries
Diffstat (limited to 'src')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVPN.java | 3 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/OpenVpnManagementThread.java | 2 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/VpnProfile.java | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java index 40fe3afd..55e15abc 100644 --- a/src/de/blinkt/openvpn/OpenVPN.java +++ b/src/de/blinkt/openvpn/OpenVPN.java @@ -7,6 +7,9 @@ public class OpenVPN { private static final int MAXLOGENTRIES = 200; + public static final String MANAGMENT_PREFIX = "M:"; + + public static LinkedList<String> logbuffer = new LinkedList<String>(); private static Vector<LogListener> logListener=new Vector<OpenVPN.LogListener>(); diff --git a/src/de/blinkt/openvpn/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/OpenVpnManagementThread.java index affd8045..6d67a4e6 100644 --- a/src/de/blinkt/openvpn/OpenVpnManagementThread.java +++ b/src/de/blinkt/openvpn/OpenVpnManagementThread.java @@ -355,6 +355,8 @@ public class OpenVpnManagementThread implements Runnable { if(pw!=null) {
String cmd = String.format("password '%s' %s\n", needed, VpnProfile.openVpnEscape(pw));
managmentCommand(cmd);
+ } else {
+ OpenVPN.logMessage(0, OpenVPN.MANAGMENT_PREFIX, String.format("Openvpn requires Authentication type '%s' but no password/key information available", needed));
}
}
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index 5cdff43d..125dc675 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -505,7 +505,9 @@ public class VpnProfile implements Serializable{ if(!mUsePull) { if(mIPv4Address == null || cidrToIPAndNetmask(mIPv4Address) == null) return R.string.ipv4_format_error; - + } + if(isUserPWAuth() && !nonNull(mUsername)) { + return R.string.error_empty_username; } if(!mUseDefaultRoute && getCustomRoutes()==null) return R.string.custom_route_format_error; |