diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-01-14 20:05:44 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-01-14 20:05:44 +0100 |
commit | f339189c5bb81b9c2f0e5a302f2595923ef3fcda (patch) | |
tree | c68dc78c29781d38d7f4810ab2403c0eb021fffa /src/de | |
parent | 15304b9a43b7c200b0d82c8cfacdfaa40c06b1c1 (diff) |
Do not save BYTECOUNT state message as last message.
Diffstat (limited to 'src/de')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVPN.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java index 7b4693f9..8d6cb4c8 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); } |