summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-01-14 20:05:44 +0100
committerArne Schwabe <arne@rfc2549.org>2013-01-14 20:05:44 +0100
commitb085af35b5704a6bb5c2f36a044fc0cfba9b87d3 (patch)
tree2bded3c78785e0fe0e7e319fc7540713e44cb7ba /src
parenta8830f6b1d48675a5067f18f5a2ce4dac6e5ffc1 (diff)
Do not save BYTECOUNT state message as last message.
Diffstat (limited to 'src')
-rw-r--r--src/de/blinkt/openvpn/OpenVPN.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java
index 7b4693f..8d6cb4c 100644
--- a/src/de/blinkt/openvpn/OpenVPN.java
+++ b/src/de/blinkt/openvpn/OpenVPN.java
@@ -4,6 +4,7 @@ import java.util.LinkedList;
import java.util.Locale;
import java.util.Vector;
+
import android.content.Context;
import android.os.Build;
@@ -82,7 +83,7 @@ public class OpenVPN {
String str = String.format(Locale.ENGLISH,"Log (no context) resid %d", mRessourceId);
if(mArgs !=null)
for(Object o:mArgs)
- str += "|" + o.toString();
+ str += "|" + o.toString();
return str;
}
}
@@ -137,7 +138,7 @@ public class OpenVPN {
if(mLaststate!=null)
sl.updateState(mLaststate, mLaststatemsg, mLastStateresid);
}
-
+
private static int getLocalizedState(String state){
if (state.equals("CONNECTING"))
return R.string.state_connecting;
@@ -198,10 +199,12 @@ public class OpenVPN {
}
public synchronized static void updateStateString(String state, String msg, int resid) {
- mLaststate= state;
- mLaststatemsg = msg;
- mLastStateresid = resid;
-
+ if (! "BYTECOUNT".equals(state)) {
+ mLaststate= state;
+ mLaststatemsg = msg;
+ mLastStateresid = resid;
+ }
+
for (StateListener sl : stateListener) {
sl.updateState(state,msg,resid);
}