summaryrefslogtreecommitdiff
path: root/openvpn
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-12-22 17:47:59 +0100
committerArne Schwabe <arne@rfc2549.org>2012-12-22 17:47:59 +0100
commit1fb9c1158ecb1df4499ccfef98fa71568a35fb90 (patch)
tree47d406eea17bb4aa703fcf75d1d1260eac049718 /openvpn
parent5ae6e66c76a8d7da2c22882d487576234ca21c26 (diff)
Add google-breakpad support to ics-openvpn
Diffstat (limited to 'openvpn')
-rw-r--r--openvpn/Android.mk17
-rw-r--r--openvpn/src/openvpn/init.c5
-rw-r--r--openvpn/src/openvpn/openvpn.c6
3 files changed, 23 insertions, 5 deletions
diff --git a/openvpn/Android.mk b/openvpn/Android.mk
index b27ef794..6307e5e0 100644
--- a/openvpn/Android.mk
+++ b/openvpn/Android.mk
@@ -1,17 +1,21 @@
-# Android openvpn JNI
LOCAL_PATH:= $(call my-dir)/
include $(CLEAR_VARS)
LOCAL_LDLIBS := -lz
-LOCAL_C_INCLUDES := openssl/include lzo/include openssl/crypto openssl openvpn/src/compat openvpn/src/openvpn openvpn/include
+LOCAL_C_INCLUDES := openssl/include lzo/include openssl/crypto openssl openvpn/src/compat openvpn/src/openvpn openvpn/include google-breakpad/src google-breakpad/src/common/android/include
LOCAL_SHARED_LIBRARIES := libssl libcrypto
#LOCAL_STATIC_LIBRARIES := libssl_static libcrypto_static liblzo-static
+
+LOCAL_CFLAGS= -DHAVE_CONFIG_H -DTARGET_ABI=\"${TARGET_ABI}\"
LOCAL_STATIC_LIBRARIES := liblzo-static
+ifneq ($(TARGET_ARCH),mips)
+LOCAL_STATIC_LIBRARIES += breakpad_client
+LOCAL_CFLAGS += -DGOOGLE_BREAKPAD=1
+endif
-LOCAL_CFLAGS= -DHAVE_CONFIG_H -DTARGET_ABI=\"${TARGET_ABI}\"
LOCAL_MODULE = openvpn
LOCAL_SRC_FILES:= \
@@ -85,7 +89,12 @@ LOCAL_SRC_FILES:= \
src/openvpn/ssl_verify_openssl.c \
src/openvpn/ssl_verify_polarssl.c \
src/openvpn/status.c \
- src/openvpn/tun.c
+ src/openvpn/tun.c
+ifneq ($(TARGET_ARCH),mips)
+LOCAL_SRC_FILES+=../jni/icsandroid.cpp
+endif
+
+
include $(BUILD_SHARED_LIBRARY)
#include $(BUILD_EXECUTABLE)
diff --git a/openvpn/src/openvpn/init.c b/openvpn/src/openvpn/init.c
index 6a1ed02d..e2942c00 100644
--- a/openvpn/src/openvpn/init.c
+++ b/openvpn/src/openvpn/init.c
@@ -3704,7 +3704,10 @@ close_context (struct context *c, int sig, unsigned int flags)
{
if ((flags & CC_USR1_TO_HUP)
|| (c->sig->source == SIG_SOURCE_HARD && (flags & CC_HARD_USR1_TO_HUP)))
- c->sig->signal_received = SIGHUP;
+ {
+ c->sig->signal_received = SIGHUP;
+ c->sig->signal_text = "close_context usr1 to hup";
+ }
}
if (!(flags & CC_NO_CLOSE))
diff --git a/openvpn/src/openvpn/openvpn.c b/openvpn/src/openvpn/openvpn.c
index 104c9e93..4bae5274 100644
--- a/openvpn/src/openvpn/openvpn.c
+++ b/openvpn/src/openvpn/openvpn.c
@@ -321,6 +321,12 @@ wmain (int argc, wchar_t *wargv[]) {
#else
int
main (int argc, char *argv[]) {
+#ifdef TARGET_ANDROID
+#ifdef GOOGLE_BREAKPAD
+#include "../jni/icsandroid.h"
+ setup_breakpad();
+#endif
+#endif
return openvpn_main(argc, argv);
}
#endif