summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-10-10 17:08:00 +0200
committerArne Schwabe <arne@rfc2549.org>2012-10-10 17:08:00 +0200
commit9a5adecd6b34e88d707285dc4eaed092585f1f2f (patch)
tree3c57dd5b1bcef54f82c603b121a150bbf512e567 /src/de/blinkt/openvpn
parent9f8f005acc77999f7adcdd58ea4f9e905153c54e (diff)
Fix bug that causes segfault on reconnectv0.5.24
Diffstat (limited to 'src/de/blinkt/openvpn')
-rw-r--r--src/de/blinkt/openvpn/OpenVPNThread.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPNThread.java b/src/de/blinkt/openvpn/OpenVPNThread.java
index 0bde3205..b4ead269 100644
--- a/src/de/blinkt/openvpn/OpenVPNThread.java
+++ b/src/de/blinkt/openvpn/OpenVPNThread.java
@@ -37,13 +37,16 @@ public class OpenVPNThread implements Runnable {
} catch (Exception e) {
Log.e(TAG, "Got " + e.toString());
} finally {
+ int exitvalue = 0;
try {
-
- } catch (Exception e) {
- // ignore
+ exitvalue = mProcess.exitValue();
+ } catch ( IllegalThreadStateException ite) {
+ OpenVPN.logError("Illegal Thread state: " + ite.getLocalizedMessage());
}
-
- OpenVPN.updateStateString("NOPROCESS","No process running");
+ if( exitvalue != 0)
+ OpenVPN.logError("Process exited with exit value " + exitvalue);
+
+ OpenVPN.updateStateString("NOPROCESS","No process running.");
mService.processDied();
@@ -89,7 +92,7 @@ public class OpenVPNThread implements Runnable {
return;
OpenVPN.logMessage(0, "P:", logline);
}
-
+
} catch (IOException e) {
OpenVPN.logMessage(0, "", "Error reading from output of OpenVPN process"+ e.getLocalizedMessage());