OSDN Git Service

Set ANDROID_LOG_NAME depending on application
authorDmitry Shmidt <dimitrysh@google.com>
Fri, 30 Sep 2011 22:03:42 +0000 (15:03 -0700)
committerDmitry Shmidt <dimitrysh@google.com>
Fri, 30 Sep 2011 22:03:42 +0000 (15:03 -0700)
Change-Id: I8ef6f87c92b01a089817a4902d33bf5d0c3a5a7a
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
hostapd/Android.mk
src/utils/wpa_debug.c
wpa_supplicant/Android.mk

index 4655cfd..403375f 100644 (file)
@@ -13,6 +13,9 @@ include $(LOCAL_PATH)/.config
 # To ignore possible wrong network configurations
 L_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS
 
+# Set Android log name
+L_CFLAGS += -DANDROID_LOG_NAME=\"hostapd\"
+
 ifdef CONFIG_DRIVER_NL80211
 L_CFLAGS += -DANDROID_BRCM_P2P_PATCH
 endif
index b8c5e2f..0588fc6 100644 (file)
@@ -32,6 +32,10 @@ int wpa_debug_timestamp = 0;
 
 #include <android/log.h>
 
+#ifndef ANDROID_LOG_NAME
+#define ANDROID_LOG_NAME       "wpa_supplicant"
+#endif
+
 void android_printf(int level, char *format, ...)
 {
        if (level >= wpa_debug_level) {
@@ -45,7 +49,7 @@ void android_printf(int level, char *format, ...)
                else
                        level = ANDROID_LOG_DEBUG;
                va_start(ap, format);
-               __android_log_vprint(level, "wpa_supplicant", format, ap);
+               __android_log_vprint(level, ANDROID_LOG_NAME, format, ap);
                va_end(ap);
        }
 }
index 9d4b997..3d65cc6 100644 (file)
@@ -31,6 +31,9 @@ include $(LOCAL_PATH)/.config
 # To ignore possible wrong network configurations
 L_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS
 
+# Set Android log name
+L_CFLAGS += -DANDROID_LOG_NAME=\"wpa_supplicant\"
+
 ifdef CONFIG_DRIVER_NL80211
 L_CFLAGS += -DANDROID_BRCM_P2P_PATCH
 endif