WPS: Clean up UUID debug print

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-12-30 16:50:08 +02:00
parent 35f3d3ed5f
commit ef93abded7

View file

@ -1273,7 +1273,9 @@ static u16 wps_fix_config_methods(u16 config_methods)
static void wpas_wps_set_uuid(struct wpa_supplicant *wpa_s, static void wpas_wps_set_uuid(struct wpa_supplicant *wpa_s,
struct wps_context *wps) struct wps_context *wps)
{ {
wpa_printf(MSG_DEBUG, "WPS: Set UUID for interface %s", wpa_s->ifname); char buf[50];
const char *src;
if (is_nil_uuid(wpa_s->conf->uuid)) { if (is_nil_uuid(wpa_s->conf->uuid)) {
struct wpa_supplicant *first; struct wpa_supplicant *first;
first = wpa_s->global->ifaces; first = wpa_s->global->ifaces;
@ -1284,18 +1286,18 @@ static void wpas_wps_set_uuid(struct wpa_supplicant *wpa_s,
os_memcpy(wps->uuid, os_memcpy(wps->uuid,
wpa_s->global->ifaces->wps->uuid, wpa_s->global->ifaces->wps->uuid,
WPS_UUID_LEN); WPS_UUID_LEN);
wpa_hexdump(MSG_DEBUG, "WPS: UUID from the first " src = "from the first interface";
"interface", wps->uuid, WPS_UUID_LEN);
} else { } else {
uuid_gen_mac_addr(wpa_s->own_addr, wps->uuid); uuid_gen_mac_addr(wpa_s->own_addr, wps->uuid);
wpa_hexdump(MSG_DEBUG, "WPS: UUID based on MAC " src = "based on MAC address";
"address", wps->uuid, WPS_UUID_LEN);
} }
} else { } else {
os_memcpy(wps->uuid, wpa_s->conf->uuid, WPS_UUID_LEN); os_memcpy(wps->uuid, wpa_s->conf->uuid, WPS_UUID_LEN);
wpa_hexdump(MSG_DEBUG, "WPS: UUID based on configuration", src = "based on configuration";
wps->uuid, WPS_UUID_LEN);
} }
uuid_bin2str(wps->uuid, buf, sizeof(buf));
wpa_dbg(wpa_s, MSG_DEBUG, "WPS: UUID %s: %s", src, buf);
} }