]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix CONFIG_NO_STDOUT_DEBUG=y build
authorJouni Malinen <jouni.malinen@atheros.com>
Thu, 10 Feb 2011 18:24:06 +0000 (20:24 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 10 Feb 2011 18:24:06 +0000 (20:24 +0200)
src/utils/wpa_debug.c
src/utils/wpa_debug.h
wpa_supplicant/wpa_supplicant.c

index fa453eb61a913d46507720e503ffda32d4955ffc..27a61c0f2394b0143098778ef2b853b1afc4537d 100644 (file)
@@ -23,9 +23,6 @@ static int wpa_debug_syslog = 0;
 #endif /* CONFIG_DEBUG_SYSLOG */
 
 
-#ifdef CONFIG_DEBUG_FILE
-static FILE *out_file = NULL;
-#endif /* CONFIG_DEBUG_FILE */
 int wpa_debug_level = MSG_INFO;
 int wpa_debug_show_keys = 0;
 int wpa_debug_timestamp = 0;
@@ -33,6 +30,11 @@ int wpa_debug_timestamp = 0;
 
 #ifndef CONFIG_NO_STDOUT_DEBUG
 
+#ifdef CONFIG_DEBUG_FILE
+static FILE *out_file = NULL;
+#endif /* CONFIG_DEBUG_FILE */
+
+
 void wpa_debug_print_timestamp(void)
 {
        struct os_time tv;
index 018d6342357d52ae0dd4374a10521b40182a7fd7..0c8cdf2bcb2cda6893394662c495225cb4255274 100644 (file)
@@ -38,6 +38,11 @@ enum {
 #define wpa_debug_close_file() do { } while (0)
 #define wpa_dbg(args...) do { } while (0)
 
+static inline int wpa_debug_reopen_file(void)
+{
+       return 0;
+}
+
 #else /* CONFIG_NO_STDOUT_DEBUG */
 
 int wpa_debug_open_file(const char *path);
@@ -157,6 +162,7 @@ void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf,
 #define wpa_msg(args...) do { } while (0)
 #define wpa_msg_ctrl(args...) do { } while (0)
 #define wpa_msg_register_cb(f) do { } while (0)
+#define wpa_msg_register_ifname_cb(f) do { } while (0)
 #else /* CONFIG_NO_WPA_MSG */
 /**
  * wpa_msg - Conditional printf for default target and ctrl_iface monitors
index c32f01c1e70cf4c8cd14e0b8648879e6f09acca3..7b0bbd1665ec1aa41240f2fd7358d91b7cf96a28 100644 (file)
@@ -2338,6 +2338,7 @@ struct wpa_supplicant * wpa_supplicant_get_iface(struct wpa_global *global,
 }
 
 
+#ifndef CONFIG_NO_WPA_MSG
 static const char * wpa_supplicant_msg_ifname_cb(void *ctx)
 {
        struct wpa_supplicant *wpa_s = ctx;
@@ -2345,6 +2346,7 @@ static const char * wpa_supplicant_msg_ifname_cb(void *ctx)
                return NULL;
        return wpa_s->ifname;
 }
+#endif /* CONFIG_NO_WPA_MSG */
 
 
 /**
@@ -2364,7 +2366,9 @@ struct wpa_global * wpa_supplicant_init(struct wpa_params *params)
        if (params == NULL)
                return NULL;
 
+#ifndef CONFIG_NO_WPA_MSG
        wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
+#endif /* CONFIG_NO_WPA_MSG */
 
        wpa_debug_open_file(params->wpa_debug_file_path);
        if (params->wpa_debug_syslog)