From e26be4756596acf5be292955079ae33f228408d8 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Tue, 26 Nov 2013 13:45:01 +0100 Subject: bugfixes for switch toggle behavior --- src/se/leap/openvpn/OpenVPNThread.java | 2 +- src/se/leap/openvpn/OpenVpnManagementThread.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/se/leap/openvpn') diff --git a/src/se/leap/openvpn/OpenVPNThread.java b/src/se/leap/openvpn/OpenVPNThread.java index 0c383ab0..ffd21732 100644 --- a/src/se/leap/openvpn/OpenVPNThread.java +++ b/src/se/leap/openvpn/OpenVPNThread.java @@ -56,7 +56,7 @@ public class OpenVPNThread implements Runnable { if( exitvalue != 0) OpenVPN.logError("Process exited with exit value " + exitvalue); - OpenVPN.updateStateString("NOPROCESS","No process running.", R.string.state_noprocess); +// OpenVPN.updateStateString("NOPROCESS","No process running.", R.string.state_noprocess); fixes bug #4565 if(mDumpPath!=null) { try { BufferedWriter logout = new BufferedWriter(new FileWriter(mDumpPath + ".log")); diff --git a/src/se/leap/openvpn/OpenVpnManagementThread.java b/src/se/leap/openvpn/OpenVpnManagementThread.java index b4da1e30..287de58e 100644 --- a/src/se/leap/openvpn/OpenVpnManagementThread.java +++ b/src/se/leap/openvpn/OpenVpnManagementThread.java @@ -211,8 +211,11 @@ public class OpenVpnManagementThread implements Runnable { OpenVPN.logMessage(0, "MGMT:", "Got unrecognized command" + command); Log.i(TAG, "Got unrecognized command" + command); } - } else if (command.startsWith("SUCCESS:")) { - // ignore + } else if (command.startsWith("SUCCESS:")) { //Fixes bug LEAP #4565 + if (command.equals("SUCCESS: signal SIGINT thrown")){ + Log.d(TAG, "SUCCESS: signal SIGINT thrown"); + processState(",EXITING,SIGINT,,"); + } } else { Log.i(TAG, "Got unrecognized line from managment" + command); OpenVPN.logMessage(0, "MGMT:", "Got unrecognized line from management:" + command); -- cgit v1.2.3