diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-02-09 16:44:00 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-02-09 16:44:00 +0100 |
commit | d6c35a95905c276a5241bdbf3a01ca89c3c9fd31 (patch) | |
tree | 1d3cbad91d0ea13ffdebe7e180b17c76bccdab2a /src/de/blinkt/openvpn/OpenVPN.java | |
parent | fa9f76f27cf1a50122227e8ff9e98adb8eeb44f0 (diff) |
More refactoring/complete support for openvpn 3 core
--HG--
branch : ovpn3
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVPN.java')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVPN.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java index c1616f2d..2ca2d259 100644 --- a/src/de/blinkt/openvpn/OpenVPN.java +++ b/src/de/blinkt/openvpn/OpenVPN.java @@ -173,6 +173,8 @@ public class OpenVPN { return R.string.state_add_routes; else if (state.equals("CONNECTED")) return R.string.state_connected; + else if (state.equals("DISCONNECTED")) + return R.string.state_disconnected; else if (state.equals("RECONNECTING")) return R.string.state_reconnecting; else if (state.equals("EXITING")) @@ -257,7 +259,12 @@ public class OpenVPN { newlogItem(new LogItem(LogItem.ERROR, ressourceId,args)); } - public static void updateByteCount(long in, long out, long diffin, long diffout) { + public static void updateByteCount(long in, long out) { + long lastIn = mlastByteCount[0]; + long lastOut = mlastByteCount[1]; + long diffin = in - lastIn; + long diffout = out - lastOut; + mlastByteCount = new long[] {in,out,diffin,diffout}; for(ByteCountListener bcl:byteCountListener){ bcl.updateByteCount(in, out, diffin,diffout); |