From patchwork Mon Oct 28 08:00:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 286405 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 5C5A12C00B1 for ; Mon, 28 Oct 2013 19:01:22 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id F30D89D20F; Mon, 28 Oct 2013 04:01:19 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1c+3LWJUIS+t; Mon, 28 Oct 2013 04:01:19 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 36C159C15D; Mon, 28 Oct 2013 04:01:15 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 732CC9C15D for ; Mon, 28 Oct 2013 04:01:13 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6HXjlDiQv9n7 for ; Mon, 28 Oct 2013 04:01:08 -0400 (EDT) Received: from mail-ea0-f181.google.com (mail-ea0-f181.google.com [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 702D09C159 for ; Mon, 28 Oct 2013 04:01:08 -0400 (EDT) Received: by mail-ea0-f181.google.com with SMTP id d10so2013729eaj.12 for ; Mon, 28 Oct 2013 01:01:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=tBP+a+DuK2nHD4YGl1mMEFk8m/hpzUUZ7PdUvWuPpG4=; b=saQHQvSjIK2RQKJnjaH92fS1pgx020ygL4qKOAlteeilMlKCHzf0np5+HBP2tsPYDr pV8daEE9TpBm9sFfej0qCOQVPIcp2fYpcvt/MrN0GOyoI5oMdz5dn+139sRfnh+n9zvC SBKMcT1yc1W/OhnFo2ugA10lKxWJVWD8vbBjO501ixyizIHmLZWO5Yef2n3QGgnEBGiw sdEqhXoJvy5T3IF2lku3tx/fsf1q/VTZObxual28TcGRfYR9+Zv6kL2F+JRiHj5ct2r8 JRgQ4uj8eGzn/Luhnq7dQKn5wtuaw+VP+U8dbQuvaJUFRRh0liB1Z/4atE8T7zAzr+OO umIA== X-Received: by 10.14.183.130 with SMTP id q2mr1046089eem.64.1382947267049; Mon, 28 Oct 2013 01:01:07 -0700 (PDT) Received: from hschaa-x1.site (p5B1329A3.dip0.t-ipconnect.de. [91.19.41.163]) by mx.google.com with ESMTPSA id x47sm53989127eea.16.2013.10.28.01.01.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Oct 2013 01:01:06 -0700 (PDT) From: Helmut Schaa To: hostap@lists.shmoo.com Subject: [PATCH] hostapd: Don't get stuck while failing to do a subsequent scan during ACS Date: Mon, 28 Oct 2013 09:00:46 +0100 Message-Id: <1382947246-8997-1-git-send-email-helmut.schaa@googlemail.com> X-Mailer: git-send-email 1.8.1.4 X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com Return control flow to hostapd by calling hostapd_acs_completed if requesting a scan from the underlying device fails. Signed-hostapd: Helmut Schaa --- src/ap/acs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); }