diff options
Diffstat (limited to 'src/de/blinkt/openvpn')
-rw-r--r-- | src/de/blinkt/openvpn/core/OpenVpnManagementThread.java | 1 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/core/VpnStatus.java | 17 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/core/OpenVpnManagementThread.java index caec4bd7..cfc6776d 100644 --- a/src/de/blinkt/openvpn/core/OpenVpnManagementThread.java +++ b/src/de/blinkt/openvpn/core/OpenVpnManagementThread.java @@ -339,6 +339,7 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { private void processState(String argument) {
String[] args = argument.split(",",3);
String currentstate = args[1];
+
if(args[2].equals(",,"))
VpnStatus.updateStateString(currentstate, "");
else
diff --git a/src/de/blinkt/openvpn/core/VpnStatus.java b/src/de/blinkt/openvpn/core/VpnStatus.java index 20b56172..1a3a7a26 100644 --- a/src/de/blinkt/openvpn/core/VpnStatus.java +++ b/src/de/blinkt/openvpn/core/VpnStatus.java @@ -444,15 +444,26 @@ public class VpnStatus { } public synchronized static void updateStateString(String state, String msg, int resid, ConnectionStatus level) { - mLaststate= state; + // Workound for OpenVPN doing AUTH and wait and being connected + // Simply ignore these state + if (mLastLevel == ConnectionStatus.LEVEL_CONNECTED && + (state.equals("WAIT") || state.equals("AUTH"))) + { + newLogItem(new LogItem((LogLevel.DEBUG), String.format("Ignoring OpenVPN Status in CONNECTED state (%s->%s): %s",state,level.toString(),msg))); + return; + } + + mLaststate= state; mLaststatemsg = msg; mLastStateresid = resid; mLastLevel = level; - for (StateListener sl : stateListener) { + + + for (StateListener sl : stateListener) { sl.updateState(state,msg,resid,level); } - newLogItem(new LogItem((LogLevel.DEBUG), String.format("New OpenVPN Status (%s->%s): %s",state,level.toString(),msg))); + //newLogItem(new LogItem((LogLevel.DEBUG), String.format("New OpenVPN Status (%s->%s): %s",state,level.toString(),msg))); } public static void logInfo(String message) { |