From ab9933e33e5e7b5066659b4c8911480a70f360f5 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sun, 6 May 2012 23:52:22 +0200 Subject: All control of openvpn is now over the unix socket. JNI is only used for starting openvpn. Fix configuration if no DNS information is available. (closes issue #7 hopefully) Version 0.5.0 --- src/de/blinkt/openvpn/OpenVPN.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/de/blinkt/openvpn/OpenVPN.java') diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java index cc827aae..e524da1c 100644 --- a/src/de/blinkt/openvpn/OpenVPN.java +++ b/src/de/blinkt/openvpn/OpenVPN.java @@ -8,7 +8,6 @@ import android.util.Log; public class OpenVPN { private static OpenVpnService mOpenVpnService; private static final int MAXLOGENTRIES = 500; - public static native int startOpenVPNThread(); public static native int startOpenVPNThreadArgs(String argv[]); private static final String TAG = "OpenVpn"; @@ -30,14 +29,9 @@ public class OpenVPN { System.loadLibrary("openvpn"); } - static void addRoute(String dest,String mask, String gw) { - Log.i("openvpn" ,"Got Routing information " + dest + " " + mask + " " + gw ); - mOpenVpnService.addRoute(dest,mask); - } - synchronized static void logMessage(int level,String prefix, String message) { - logbuffer.addLast(prefix + " " + message); + logbuffer.addLast(prefix + message); if(logbuffer.size()>MAXLOGENTRIES) logbuffer.removeFirst(); @@ -49,7 +43,7 @@ public class OpenVPN { } for (LogListener ll : logListener) { - ll.newLog(prefix + " " + message); + ll.newLog(prefix + message); } } @@ -72,11 +66,7 @@ public class OpenVPN { public static void setCallback(OpenVpnService openVpnService) { mOpenVpnService = openVpnService; } - - public static int openTunDevice() { - Log.d(TAG,"Opening tun device"); - return mOpenVpnService.openTun(); - } + //! Dummy method being called to force loading of JNI Libraries public static void foo() { } -- cgit v1.2.3