Fixed CONFIG_NO_HOSTAPD_LOGGER build
authorJouni Malinen <j@w1.fi>
Mon, 12 Jan 2009 19:21:31 +0000 (21:21 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 12 Jan 2009 19:21:31 +0000 (21:21 +0200)
hostapd/hostapd.c
hostapd/ieee802_1x.c
hostapd/mlme.c

index 7259174..51379dd 100644 (file)
@@ -82,6 +82,7 @@ int hostapd_for_each_interface(int (*cb)(struct hostapd_iface *iface,
 }
 
 
+#ifndef CONFIG_NO_HOSTAPD_LOGGER
 static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
                              int level, const char *txt, size_t len)
 {
@@ -181,6 +182,7 @@ static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
 
        os_free(format);
 }
+#endif /* CONFIG_NO_HOSTAPD_LOGGER */
 
 
 #ifdef EAP_SERVER
@@ -695,6 +697,7 @@ static int hostapd_flush_old_stations(struct hostapd_data *hapd)
 static void hostapd_wpa_auth_logger(void *ctx, const u8 *addr,
                                    logger_level level, const char *txt)
 {
+#ifndef CONFIG_NO_HOSTAPD_LOGGER
        struct hostapd_data *hapd = ctx;
        int hlevel;
 
@@ -712,6 +715,7 @@ static void hostapd_wpa_auth_logger(void *ctx, const u8 *addr,
        }
 
        hostapd_logger(hapd, addr, HOSTAPD_MODULE_WPA, hlevel, "%s", txt);
+#endif /* CONFIG_NO_HOSTAPD_LOGGER */
 }
 
 
index 839f7e0..ac60cb6 100644 (file)
@@ -1617,6 +1617,7 @@ static int ieee802_1x_sta_entry_alive(void *ctx, const u8 *addr)
 static void ieee802_1x_logger(void *ctx, const u8 *addr,
                              eapol_logger_level level, const char *txt)
 {
+#ifndef CONFIG_NO_HOSTAPD_LOGGER
        struct hostapd_data *hapd = ctx;
        int hlevel;
 
@@ -1635,6 +1636,7 @@ static void ieee802_1x_logger(void *ctx, const u8 *addr,
 
        hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE8021X, hlevel, "%s",
                       txt);
+#endif /* CONFIG_NO_HOSTAPD_LOGGER */
 }
 
 
index d883931..3945dfe 100644 (file)
@@ -22,6 +22,7 @@
 #include "mlme.h"
 
 
+#ifndef CONFIG_NO_HOSTAPD_LOGGER
 static const char * mlme_auth_alg_str(int alg)
 {
        switch (alg) {
@@ -35,6 +36,7 @@ static const char * mlme_auth_alg_str(int alg)
 
        return "unknown";
 }
+#endif /* CONFIG_NO_HOSTAPD_LOGGER */
 
 
 /**