summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/OpenVPN.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-02-09 17:03:27 +0100
committerArne Schwabe <arne@rfc2549.org>2013-02-09 17:03:27 +0100
commitc89414179f77982751064a5709122913c3ffd6c4 (patch)
tree225211a18ce80513c4b05a9525538444b563f18b /src/de/blinkt/openvpn/OpenVPN.java
parent9fab59b5c4b928989eec21bd598c01e5234a18d0 (diff)
Merge non OpenVPN3 specific into main
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVPN.java')
-rw-r--r--src/de/blinkt/openvpn/OpenVPN.java9
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);