diff mbox

hostapd: Don't get stuck while failing to do a subsequent scan during ACS

Message ID 1382947246-8997-1-git-send-email-helmut.schaa@googlemail.com
State Accepted
Headers show

Commit Message

Helmut Schaa Oct. 28, 2013, 8 a.m. UTC
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 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Jouni Malinen Oct. 31, 2013, 9:24 p.m. UTC | #1
On Mon, Oct 28, 2013 at 09:00:46AM +0100, Helmut Schaa wrote:
> Return control flow to hostapd by calling hostapd_acs_completed if requesting
> a scan from the underlying device fails.

Thanks, applied.
diff mbox

Patch

diff --git a/src/ap/acs.c b/src/ap/acs.c
index 019b334..d7c921d 100644
--- a/src/ap/acs.c
+++ b/src/ap/acs.c
@@ -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);
 }