nl80211: skip event notifications in wpa_supplicant scan result reply
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
c1a03e8231
commit
5a5e21b158
1 changed files with 6 additions and 1 deletions
|
@ -2209,8 +2209,12 @@ static int nl80211_get_scanlist_wpactl(const char *ifname, char *buf, int *len)
|
|||
}
|
||||
|
||||
/* receive and parse scan results if the wait above didn't time out */
|
||||
if (ready && nl80211_wpactl_recv(sock, reply, sizeof(reply)) > 0)
|
||||
while (ready && nl80211_wpactl_recv(sock, reply, sizeof(reply)) > 0)
|
||||
{
|
||||
/* received an event notification, receive again */
|
||||
if (reply[0] == '<')
|
||||
continue;
|
||||
|
||||
nl80211_get_quality_max(ifname, &qmax);
|
||||
|
||||
for (line = strtok_r(reply, "\n", &pos);
|
||||
|
@ -2288,6 +2292,7 @@ static int nl80211_get_scanlist_wpactl(const char *ifname, char *buf, int *len)
|
|||
}
|
||||
|
||||
*len = count * sizeof(struct iwinfo_scanlist_entry);
|
||||
break;
|
||||
}
|
||||
|
||||
close(sock);
|
||||
|
|
Loading…
Add table
Reference in a new issue