diff options
| -rw-r--r-- | .hgignore | 7 | ||||
| -rw-r--r-- | openvpn/src/compat/compat-stdbool.h | 12 | ||||
| -rw-r--r-- | openvpn/src/openvpn/tun.c | 4 | ||||
| -rw-r--r-- | res/menu/vpn_context.xml | 20 | ||||
| -rw-r--r-- | res/values/strings.xml | 9 | 
5 files changed, 49 insertions, 3 deletions
@@ -2,5 +2,12 @@ obj  bin  libs  gen +openvpn/.git +openvpn/autom4te.cache +openvpn/aclocal.m4 +openvpn/config.log +openvpn/config.h.in +openvpn/configure +open  syntax: regexp  ^openvpn/xcopenvpn$
\ No newline at end of file diff --git a/openvpn/src/compat/compat-stdbool.h b/openvpn/src/compat/compat-stdbool.h new file mode 100644 index 00000000..99412188 --- /dev/null +++ b/openvpn/src/compat/compat-stdbool.h @@ -0,0 +1,12 @@ +#ifndef __COMPAT_STDBOOL_H +#define __COMPAT_STDBOOL_H + +#ifdef HAVE_STDBOOL_H +#include <stdbool.h> +#else +typedef int bool; +#define false 0 +#define true 1 +#endif + +#endif diff --git a/openvpn/src/openvpn/tun.c b/openvpn/src/openvpn/tun.c index 7aa8627d..14ec2b85 100644 --- a/openvpn/src/openvpn/tun.c +++ b/openvpn/src/openvpn/tun.c @@ -1386,7 +1386,9 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu      if(tt->options.domain)          android_set_domain(tt->options.domain); -    tt->fd = android_open_tun(); +    if((tt->fd = android_open_tun()< 0){ +        msg (M_ERR, "ERROR: Cannot open TUN"); +    }  }  #else diff --git a/res/menu/vpn_context.xml b/res/menu/vpn_context.xml new file mode 100644 index 00000000..ab681379 --- /dev/null +++ b/res/menu/vpn_context.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android" > + +    <item +        android:id="@+id/edit_vpn" +        android:icon="@android:drawable/ic_menu_edit" +        android:showAsAction="withText|ifRoom" +        android:title="@string/edit_vpn"/> +    <item +        android:id="@+id/remove_vpn" +        android:icon="@android:drawable/ic_menu_delete" +        android:showAsAction="withText|ifRoom" +        android:title="@string/remove_vpn"/> +    <item +        android:id="@+id/connect_vpn" +        android:icon="@android:drawable/ic_media_play" +        android:showAsAction="withText|ifRoom" +        android:title="@string/connect"/> + +</menu>
\ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index c8e2b1e1..5434f48b 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -21,7 +21,7 @@      <string name="address">Server Address:</string>      <string name="port">Server Port:</string>      <string name="secret">Shared Secret:</string> -    <string name="connect">Connect!</string> +    <string name="connect">Connect</string>      <string name="connecting">OpenVPN is connecting…</string>      <string name="connected">OpenVPN is connected!</string> @@ -113,9 +113,14 @@      <string name="custom_config_summary">Specify custom options. Use with care!</string>      <string name="route_rejected">Route rejected by Android</string>      <string formatted="false" name="ip_not_cidr">Cannot make sense of %s and %s as IP and CIDR netmask, assuming P2P for local address (/32)</string> -    <string name="cancel_connection">cancel</string> +    <string name="cancel_connection">Disconnect</string>      <string name="clear_log">clear log</string>      <string name="title_cancel">Cancel Confirmation</string>      <string name="cancel_connection_query">Disconnect the connected VPN/cancel the connection attempt?</string>      <string name="remove_vpn">Remove VPN</string> +    <string name="edit_vpn">Edit VPN Settings</string> +    <string name="remove_vpn_query">Remove the VPN Profile %s?</string> +    <string name="tun_error_helpful">" On some custom ICS images the permission on /dev/tun might be wrong, or the tun module might be missing completly"</string> +    <string name="tun_open_error">Opening tun interface failed badly.</string> +    <string name="error">"Error: "</string>  </resources>  | 
