Avoid partial BSS entries in control interface
Most of the print_bss_info() cases were already returning zero lenth to avoid returning partial returns to the BSS commands, but the HS 2.0 and Wi-Fi Display entries behaved differently. Make those consistent with rest of the items. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
cfd42c94ee
commit
ff48691368
1 changed files with 3 additions and 3 deletions
|
@ -3134,7 +3134,7 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
if (wpa_bss_get_vendor_ie(bss, HS20_IE_VENDOR_TYPE)) {
|
if (wpa_bss_get_vendor_ie(bss, HS20_IE_VENDOR_TYPE)) {
|
||||||
ret = os_snprintf(pos, end - pos, "[HS20]");
|
ret = os_snprintf(pos, end - pos, "[HS20]");
|
||||||
if (ret < 0 || ret >= end - pos)
|
if (ret < 0 || ret >= end - pos)
|
||||||
return -1;
|
return 0;
|
||||||
pos += ret;
|
pos += ret;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_HS20 */
|
#endif /* CONFIG_HS20 */
|
||||||
|
@ -3182,7 +3182,7 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
if (wfd) {
|
if (wfd) {
|
||||||
ret = os_snprintf(pos, end - pos, "wfd_subelems=");
|
ret = os_snprintf(pos, end - pos, "wfd_subelems=");
|
||||||
if (ret < 0 || ret >= end - pos)
|
if (ret < 0 || ret >= end - pos)
|
||||||
return pos - buf;
|
return 0;
|
||||||
pos += ret;
|
pos += ret;
|
||||||
|
|
||||||
pos += wpa_snprintf_hex(pos, end - pos,
|
pos += wpa_snprintf_hex(pos, end - pos,
|
||||||
|
@ -3192,7 +3192,7 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
|
|
||||||
ret = os_snprintf(pos, end - pos, "\n");
|
ret = os_snprintf(pos, end - pos, "\n");
|
||||||
if (ret < 0 || ret >= end - pos)
|
if (ret < 0 || ret >= end - pos)
|
||||||
return pos - buf;
|
return 0;
|
||||||
pos += ret;
|
pos += ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue