diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-05-09 17:57:40 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-05-09 17:57:40 +0200 |
commit | bebf2a9428e369a4963956ec752db27c457d9f6b (patch) | |
tree | a46475895895944a79b3452a1805ae31a7f40f4e /src/de/blinkt/openvpn/OpenVPNThread.java | |
parent | 224be050299691f2ca35d79f69aaf39d92fdbeaa (diff) |
Only try to write minivpn once per program lifetime.
Remove debug logging
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVPNThread.java')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVPNThread.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPNThread.java b/src/de/blinkt/openvpn/OpenVPNThread.java index d4d4cd64..008598e4 100644 --- a/src/de/blinkt/openvpn/OpenVPNThread.java +++ b/src/de/blinkt/openvpn/OpenVPNThread.java @@ -44,7 +44,7 @@ public class OpenVPNThread implements Runnable { // Log argv
- OpenVPN.logMessage(0, "argv:" , Arrays.toString(mArgv));
+ //OpenVPN.logMessage(0, "argv:" , Arrays.toString(mArgv));
startOpenVPNThreadArgs(mArgv);
@@ -77,7 +77,17 @@ public class OpenVPNThread implements Runnable { ProcessBuilder pb = new ProcessBuilder(argvlist);
// Hack O rama
- pb.environment().put("LD_LIBRARY_PATH", "/data/data/de.blinkt.openvpn/lib");
+
+ // Hack until I find a good way to get the real library path
+ String applibpath = argv[0].replace("/cache/minivpn", "/lib");
+
+ String lbpath = pb.environment().get("LD_LIBRARY_PATH");
+ if(lbpath==null)
+ lbpath = applibpath;
+ else
+ lbpath = lbpath + ":" + applibpath;
+
+ pb.environment().put("LD_LIBRARY_PATH", lbpath);
pb.redirectErrorStream(true);
try {
mProcess = pb.start();
|