summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-03-24 13:06:55 +0100
committerParménides GV <parmegv@sdf.org>2015-03-24 13:06:55 +0100
commit7dba6442fb80cb55fe66f3d9510f71b80cb9e2b0 (patch)
tree9950d3172065b005dfe2f54baafe5b0ff6a048f9 /app
parent4d1ee9cd65d10161d3e818e99cbd06b93e211277 (diff)
Show log if an error is reported in last 5 log messages.
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/EipFragment.java1
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java2
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java2
3 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java
index ed507de4..8b532e24 100644
--- a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java
@@ -296,6 +296,7 @@ public class EipFragment extends Fragment implements Observer {
&& !status_message.getText().toString().equalsIgnoreCase(dashboard.getString(R.string.eip_state_not_connected))){
dashboard.showLog();
}
+ status_message.setText(dashboard.getString(R.string.eip_state_not_connected));
}
private void adjustSwitch() {
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java b/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java
index f9ddc0d2..17e290b8 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java
@@ -142,7 +142,7 @@ public class EipStatus extends Observable implements VpnStatus.StateListener {
VpnStatus.LogItem[] log = VpnStatus.getlogbuffer();
String message = "";
- for (int i = 0; i < lines; i++) {
+ for (int i = 1; i <= lines && log.length > i; i++) {
message = log[log.length-i].getString(context);
for(int j = 0; j < error_keywords.length; j++)
if(message.contains(error_keywords[j]))
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java
index 25c85585..5af8b8f1 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java
@@ -148,6 +148,6 @@ public class VpnConfigGenerator {
+ new_line
+ "persist-tun"
+ new_line
- + "auth-retry nointeract remove";
+ + "auth-retry nointeract"
}
}