summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/OpenVpnManagementThread.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-05-18 19:12:38 +0200
committerArne Schwabe <arne@rfc2549.org>2012-05-18 19:12:38 +0200
commit42423ebf890bc51a9d8d24539fb05a200d878885 (patch)
tree956218cce68e85c85b940b4378ce7630bf8e99cb /src/de/blinkt/openvpn/OpenVpnManagementThread.java
parent40eb17c3c472bf088568abe7082427f1ab891399 (diff)
Version 0.5.5
- Add state to speed display
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVpnManagementThread.java')
-rw-r--r--src/de/blinkt/openvpn/OpenVpnManagementThread.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/OpenVpnManagementThread.java
index 82d6f00d..c10cdb1e 100644
--- a/src/de/blinkt/openvpn/OpenVpnManagementThread.java
+++ b/src/de/blinkt/openvpn/OpenVpnManagementThread.java
@@ -161,10 +161,13 @@ public class OpenVpnManagementThread implements Runnable {
} else if (cmd.equals("HOLD")) {
managmentCommand("hold release\n");
managmentCommand("bytecount " + mBytecountinterval + "\n");
+ managmentCommand("state on\n");
} else if (cmd.equals("NEED-OK")) {
processNeedCommand(argument);
} else if (cmd.equals("BYTECOUNT")){
processByteCount(argument);
+ } else if (cmd.equals("STATE")){
+ processState(argument);
} else if (cmd.equals("LOG")) {
String[] args = argument.split(",",3);
// 0 unix time stamp
@@ -183,6 +186,12 @@ public class OpenVpnManagementThread implements Runnable {
}
}
+ private void processState(String argument) {
+ String[] args = argument.split(",",2);
+ OpenVPN.updateStateString(args[1]);
+ }
+
+
private void processByteCount(String argument) {
// >BYTECOUNT:{BYTES_IN},{BYTES_OUT}
int comma = argument.indexOf(',');
@@ -200,7 +209,7 @@ public class OpenVpnManagementThread implements Runnable {
humanReadableByteCount(diffin, false),
humanReadableByteCount(out, false),
humanReadableByteCount(diffout, false));
- OpenVPN.updateSpeedString(netstat);
+ OpenVPN.updateStateString(netstat);
}