From 5c90d47657be7cda59bbf1605b989429d3e82978 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 6 Dec 2009 18:23:53 +0200 Subject: [PATCH] Move EAP-SIM DB conditional build into hostapd --- hostapd/hostapd.c | 8 ++++---- src/eap_server/eap_sim_db.h | 16 ---------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/hostapd/hostapd.c b/hostapd/hostapd.c index acde72e7a..16210ea3b 100644 --- a/hostapd/hostapd.c +++ b/hostapd/hostapd.c @@ -328,12 +328,12 @@ static void hostapd_cleanup(struct hostapd_data *hapd) } #endif /* EAP_TLS_FUNCS */ -#ifdef EAP_SERVER +#if defined(EAP_SERVER_SIM) || defined(EAP_SERVER_AKA) if (hapd->eap_sim_db_priv) { eap_sim_db_deinit(hapd->eap_sim_db_priv); hapd->eap_sim_db_priv = NULL; } -#endif /* EAP_SERVER */ +#endif /* EAP_SERVER_SIM || EAP_SERVER_AKA */ if (hapd->interface_added && hostapd_bss_remove(hapd, hapd->conf->iface)) { @@ -1430,7 +1430,7 @@ hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface, } #endif /* EAP_TLS_FUNCS */ -#ifdef EAP_SERVER +#if defined(EAP_SERVER_SIM) || defined(EAP_SERVER_AKA) if (hapd->conf->eap_sim_db) { hapd->eap_sim_db_priv = eap_sim_db_init(hapd->conf->eap_sim_db, @@ -1441,7 +1441,7 @@ hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface, goto fail; } } -#endif /* EAP_SERVER */ +#endif /* EAP_SERVER_SIM || EAP_SERVER_AKA */ hapd->driver = hapd->iconf->driver; diff --git a/src/eap_server/eap_sim_db.h b/src/eap_server/eap_sim_db.h index a22616333..ab89ae97d 100644 --- a/src/eap_server/eap_sim_db.h +++ b/src/eap_server/eap_sim_db.h @@ -15,8 +15,6 @@ #ifndef EAP_SIM_DB_H #define EAP_SIM_DB_H -#if defined(EAP_SERVER_SIM) || defined(EAP_SERVER_AKA) - #include "eap_common/eap_sim_common.h" /* Identity prefixes */ @@ -90,18 +88,4 @@ int eap_sim_db_resynchronize(void *priv, const u8 *identity, size_t identity_len, const u8 *auts, const u8 *_rand); -#else /* EAP_SERVER_SIM || EAP_SERVER_AKA */ -static inline void * -eap_sim_db_init(const char *config, - void (*get_complete_cb)(void *ctx, void *session_ctx), - void *ctx) -{ - return (void *) 1; -} - -static inline void eap_sim_db_deinit(void *priv) -{ -} -#endif /* EAP_SERVER_SIM || EAP_SERVER_AKA */ - #endif /* EAP_SIM_DB_H */