diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-04-26 17:12:16 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-04-26 17:12:16 +0200 |
commit | 2a82f87ac94432b35ae81e7404beb4314be9d235 (patch) | |
tree | eac36a1c121df7ad27dd3d393f16a384326b5854 | |
parent | 77c32f0eb637524f7f300d8cf24d455ccec5c2bb (diff) | |
download | iwinfo-2a82f87ac94432b35ae81e7404beb4314be9d235.tar.gz |
nl80211: back out early when receiving FAIL-BUSY reply
The wpa_supplicant control socket might reply with "FAIL-BUSY" when
attempting to start a scan while another scanning process is already
running, back out early in this case.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | iwinfo_nl80211.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c index de5d2b4..ecd2d6a 100644 --- a/iwinfo_nl80211.c +++ b/iwinfo_nl80211.c @@ -2223,6 +2223,12 @@ static int nl80211_get_scanlist_wpactl(const char *ifname, char *buf, int *len) /* is another unrelated event, retry */ tries--; } + + /* got a failure reply */ + else if (!strcmp(reply, "FAIL-BUSY\n")) + { + break; + } } /* receive and parse scan results if the wait above didn't time out */ |