From 25e87d740e07ab9ade259fbc57d038337b79b66f Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 9 May 2012 23:17:23 +0200 Subject: small fixed --- openvpn/src/openvpn/error.c | 15 +-------------- openvpn/src/openvpn/socket.c | 1 - src/de/blinkt/openvpn/VpnProfile.java | 10 ++++++---- todo.txt | 1 + 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/openvpn/src/openvpn/error.c b/openvpn/src/openvpn/error.c index 83a9eb4b..e2e24b1e 100644 --- a/openvpn/src/openvpn/error.c +++ b/openvpn/src/openvpn/error.c @@ -199,11 +199,6 @@ msg_fp(const unsigned int flags) int x_msg_line_num; /* GLOBAL */ -#include "android/log.h" - - - - void x_msg (const unsigned int flags, const char *format, ...) { struct gc_arena gc; @@ -219,7 +214,6 @@ void x_msg (const unsigned int flags, const char *format, ...) const char *prefix_sep; void usage_small (void); - #ifndef HAVE_VARARG_MACROS /* the macro has checked this otherwise */ @@ -304,12 +298,10 @@ void x_msg (const unsigned int flags, const char *format, ...) if (!prefix) prefix_sep = prefix = ""; - /* virtual output capability used to copy output to management subsystem */ if (!forked) { const struct virtual_output *vo = msg_get_virtual_output (); - if (vo) { openvpn_snprintf (m2, ERR_BUF_SIZE, "%s%s%s", @@ -331,7 +323,7 @@ void x_msg (const unsigned int flags, const char *format, ...) m1); #endif } - else // No Syslog + else { FILE *fp = msg_fp(flags); const bool show_usec = check_debug_level (DEBUG_LEVEL_USEC_TIME); @@ -356,13 +348,8 @@ void x_msg (const unsigned int flags, const char *format, ...) fflush(fp); ++x_msg_line_num; } -#ifdef TARGET_ANDROID - android_openvpn_log(prefix,prefix_sep,m1);; -#endif } - - if (flags & M_FATAL) msg (M_INFO, "Exiting due to fatal error"); diff --git a/openvpn/src/openvpn/socket.c b/openvpn/src/openvpn/socket.c index 71010979..b92c2828 100644 --- a/openvpn/src/openvpn/socket.c +++ b/openvpn/src/openvpn/socket.c @@ -859,7 +859,6 @@ create_socket_tcp (void) msg (M_SOCKERR, "TCP: Cannot setsockopt SO_LINGER on TCP socket"); } #endif - return sd; } diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index 26cf50bd..c18575da 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -92,8 +92,10 @@ public class VpnProfile implements Serializable{ public String mVerb="1"; - public static String openVpnEscape(String unescape) { - String escapedString = unescape.replace("\\", "\\\\"); + public static String openVpnEscape(String unescaped) { + if(unescaped==null) + return null; + String escapedString = unescaped.replace("\\", "\\\\"); escapedString = escapedString.replace("\"","\\\""); escapedString = escapedString.replace("\n","\\n"); return '"' + escapedString + '"'; @@ -343,8 +345,8 @@ public class VpnProfile implements Serializable{ Vector args = new Vector(); // Add fixed paramenters - //args.add(cacheDir.getAbsolutePath() +"/" +"openvpn"); - args.add(cacheDir.getAbsolutePath() +"/" +"minivpn"); + //args.add("/data/data/de.blinkt.openvpn/lib/openvpn"); + args.add(cacheDir.getAbsolutePath() +"/" +"openvpn"); args.add("--config"); args.add(cacheDir.getAbsolutePath() + "/" + OVPNCONFIGFILE); diff --git a/todo.txt b/todo.txt index c12a0147..49fc9a8b 100644 --- a/todo.txt +++ b/todo.txt @@ -41,4 +41,5 @@ Requested by users: cipher auth mtu-link +nobind -- cgit v1.2.3