Mark last BSS entry by #### instead of ====
This allows ctrl_iface users to iterate through the BSS entries by fetching multiple BSS entries with "BSS RANGE=N-" without having to use one extra round to get empty return value as the indication of the last entry having been found. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
parent
c667342933
commit
cfd42c94ee
1 changed files with 6 additions and 1 deletions
|
@ -3353,8 +3353,13 @@ static int wpa_supplicant_ctrl_iface_bss(struct wpa_supplicant *wpa_s,
|
||||||
ret += len;
|
ret += len;
|
||||||
buf += len;
|
buf += len;
|
||||||
buflen -= len;
|
buflen -= len;
|
||||||
if (bss == bsslast)
|
if (bss == bsslast) {
|
||||||
|
if ((mask & WPA_BSS_MASK_DELIM) && len &&
|
||||||
|
(bss == dl_list_last(&wpa_s->bss_id,
|
||||||
|
struct wpa_bss, list_id)))
|
||||||
|
os_snprintf(buf - 5, 5, "####\n");
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
next = bss->list_id.next;
|
next = bss->list_id.next;
|
||||||
if (next == &wpa_s->bss_id)
|
if (next == &wpa_s->bss_id)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue