diff options
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVPNThread.java')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVPNThread.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPNThread.java b/src/de/blinkt/openvpn/OpenVPNThread.java index ce332677..4c00707b 100644 --- a/src/de/blinkt/openvpn/OpenVPNThread.java +++ b/src/de/blinkt/openvpn/OpenVPNThread.java @@ -13,11 +13,13 @@ public class OpenVPNThread implements Runnable { private OpenVpnService mService;
private String[] mArgv;
private Process mProcess;
+ private String mNativeDir;
- public OpenVPNThread(OpenVpnService service,String[] argv)
+ public OpenVPNThread(OpenVpnService service,String[] argv, String nativelibdir)
{
mService = service;
mArgv = argv;
+ mNativeDir = nativelibdir;
}
public void stopProcess() {
@@ -76,11 +78,15 @@ public class OpenVPNThread implements Runnable { String applibpath = argv[0].replace("/cache/minivpn", "/lib");
String lbpath = pb.environment().get("LD_LIBRARY_PATH");
- if(lbpath==null)
+ if(lbpath==null)
lbpath = applibpath;
else
lbpath = lbpath + ":" + applibpath;
+ if (!applibpath.equals(mNativeDir)) {
+ lbpath = lbpath + ":" + mNativeDir;
+ }
+
pb.environment().put("LD_LIBRARY_PATH", lbpath);
pb.redirectErrorStream(true);
try {
|