mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
wpa_supplicant: Fix configurable debug log feature's warning issue
This commit is contained in:
parent
b4b51f5a5e
commit
e456bfedd7
@ -149,14 +149,14 @@ void wpa_hexdump_ascii(int level, const char *title, const u8 *buf,
|
||||
void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf,
|
||||
size_t len);
|
||||
#else
|
||||
#define wpa_printf(level,fmt, args...)
|
||||
#define wpa_hexdump(...)
|
||||
#define wpa_dump_mem(...)
|
||||
#define wpa_hexdump_buf(...)
|
||||
#define wpa_hexdump_key(...)
|
||||
#define wpa_hexdump_buf_key(...)
|
||||
#define wpa_hexdump_ascii(...)
|
||||
#define wpa_hexdump_ascii_key(...)
|
||||
#define wpa_printf(level,fmt, args...) do {} while(0)
|
||||
#define wpa_hexdump(...) do {} while(0)
|
||||
#define wpa_dump_mem(...) do {} while(0)
|
||||
#define wpa_hexdump_buf(...) do {} while(0)
|
||||
#define wpa_hexdump_key(...) do {} while(0)
|
||||
#define wpa_hexdump_buf_key(...) do {} while(0)
|
||||
#define wpa_hexdump_ascii(...) do {} while(0)
|
||||
#define wpa_hexdump_ascii_key(...) do {} while(0)
|
||||
#endif
|
||||
|
||||
#define wpa_auth_logger
|
||||
|
@ -1038,7 +1038,9 @@ get_defaults:
|
||||
int eap_peer_tls_phase2_nak(struct eap_method_type *types, size_t num_types,
|
||||
struct eap_hdr *hdr, struct wpabuf **resp)
|
||||
{
|
||||
#ifdef DEBUG_PRINT
|
||||
u8 *pos = (u8 *) (hdr + 1);
|
||||
#endif
|
||||
size_t i;
|
||||
|
||||
/* TODO: add support for expanded Nak */
|
||||
|
@ -2486,14 +2486,18 @@ static int wps_process_wps_state(struct wps_data *wps, const u8 *state)
|
||||
|
||||
static int wps_process_assoc_state(struct wps_data *wps, const u8 *assoc)
|
||||
{
|
||||
u16 a;
|
||||
#ifdef DEBUG_PRINT
|
||||
u16 a;
|
||||
#endif
|
||||
|
||||
if (assoc == NULL) {
|
||||
wpa_printf(MSG_DEBUG, "WPS: No Association State received");
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_PRINT
|
||||
a = WPA_GET_BE16(assoc);
|
||||
#endif
|
||||
wpa_printf(MSG_DEBUG, "WPS: Enrollee Association State %d", a);
|
||||
|
||||
return 0;
|
||||
@ -2502,14 +2506,18 @@ static int wps_process_assoc_state(struct wps_data *wps, const u8 *assoc)
|
||||
|
||||
static int wps_process_config_error(struct wps_data *wps, const u8 *err)
|
||||
{
|
||||
u16 e;
|
||||
#ifdef DEBUG_PRINT
|
||||
u16 e;
|
||||
#endif
|
||||
|
||||
if (err == NULL) {
|
||||
wpa_printf(MSG_DEBUG, "WPS: No Configuration Error received");
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_PRINT
|
||||
e = WPA_GET_BE16(err);
|
||||
#endif
|
||||
wpa_printf(MSG_DEBUG, "WPS: Enrollee Configuration Error %d", e);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user