]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
ACS: Do not get stuck while failing to do a subsequent scan
authorHelmut Schaa <helmut.schaa@googlemail.com>
Thu, 31 Oct 2013 12:54:55 +0000 (14:54 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 31 Oct 2013 13:12:21 +0000 (15:12 +0200)
Return control flow to hostapd by calling hostapd_acs_completed()
if requesting a scan from the underlying device fails.

Signed-hostapd: Helmut Schaa <helmut.schaa@googlemail.com>

src/ap/acs.c

index 019b334fdabc1ed8c3eb84a206e6d43e9fdaa0ff..d7c921d321b38885bbd47715b930368f88a8a065 100644 (file)
@@ -729,14 +729,17 @@ static void acs_scan_complete(struct hostapd_iface *iface)
                err = acs_request_scan(iface);
                if (err) {
                        wpa_printf(MSG_ERROR, "ACS: Failed to request scan");
-                       acs_fail(iface);
-                       return;
+                       goto fail;
                }
 
                return;
        }
 
        acs_study(iface);
+       return;
+fail:
+       hostapd_acs_completed(iface, 1);
+       acs_fail(iface);
 }