From a09e92879523aafc3b6fdefe90451ef813968435 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sun, 20 May 2012 14:45:24 +0200 Subject: Another market backtrace, not should what happens here. Hope for a user to report it :) --- src/de/blinkt/openvpn/OpenVpnManagementThread.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/de/blinkt/openvpn/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/OpenVpnManagementThread.java index c10cdb1e..affd8045 100644 --- a/src/de/blinkt/openvpn/OpenVpnManagementThread.java +++ b/src/de/blinkt/openvpn/OpenVpnManagementThread.java @@ -330,20 +330,20 @@ public class OpenVpnManagementThread implements Runnable { private void processPWCommand(String argument) { //argument has the form Need 'Private Key' password - int p1,p2; + + String needed; try{ - p1 =argument.indexOf('\''); - p2 = argument.indexOf('\'',p1+1); - //String needed = argument.replace("Need '", "").replace("' password", ""); + + int p1 = argument.indexOf('\''); + int p2 = argument.indexOf('\'',p1+1); + needed = argument.substring(p1+1, p2); } catch (StringIndexOutOfBoundsException sioob) { OpenVPN.logMessage(0, "", "Could not parse management Password command: " + argument); return; } - String needed = argument.substring(p1+1, p2); String pw=null; - if(needed.equals("Private Key")) { pw = mProfile.getPasswordPrivateKey(); } else if (needed.equals("Auth")) { -- cgit v1.2.3