Fix location of P2P indication flag in BSS ctrl_iface output

This commit is contained in:
Jouni Malinen 2011-10-03 18:19:24 +03:00 committed by Jouni Malinen
parent 783fcb7d03
commit cc81110d55

View File

@ -1943,12 +1943,6 @@ static int wpa_supplicant_ctrl_iface_bss(struct wpa_supplicant *wpa_s,
return pos - buf;
pos += ret;
}
if (wpa_bss_get_vendor_ie(bss, P2P_IE_VENDOR_TYPE)) {
ret = os_snprintf(pos, end - pos, "[P2P]");
if (ret < 0 || ret >= end - pos)
return pos - buf;
pos += ret;
}
ret = os_snprintf(pos, end - pos, "\n");
if (ret < 0 || ret >= end - pos)
@ -1985,6 +1979,12 @@ static int wpa_supplicant_ctrl_iface_bss(struct wpa_supplicant *wpa_s,
return pos - buf;
pos += ret;
}
if (wpa_bss_get_vendor_ie(bss, P2P_IE_VENDOR_TYPE)) {
ret = os_snprintf(pos, end - pos, "[P2P]");
if (ret < 0 || ret >= end - pos)
return pos - buf;
pos += ret;
}
ret = os_snprintf(pos, end - pos, "\n");
if (ret < 0 || ret >= end - pos)