From patchwork Wed Dec 28 07:30:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jungwalk@gmail.com X-Patchwork-Id: 133414 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 9E523B6FC9 for ; Wed, 28 Dec 2011 18:33:17 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 2A3459C19B; Wed, 28 Dec 2011 02:33:13 -0500 (EST) 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 U6E6j3I5qRK9; Wed, 28 Dec 2011 02:33:12 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 219809C1C1; Wed, 28 Dec 2011 02:33:09 -0500 (EST) 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 B439E9C19B for ; Wed, 28 Dec 2011 02:33:07 -0500 (EST) 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 f2HARZxvmlYe for ; Wed, 28 Dec 2011 02:33:04 -0500 (EST) Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 11BF79C1C1 for ; Wed, 28 Dec 2011 02:33:03 -0500 (EST) Received: by iaen33 with SMTP id n33so18019692iae.17 for ; Tue, 27 Dec 2011 23:33:02 -0800 (PST) Received: by 10.50.186.226 with SMTP id fn2mr34944261igc.25.1325057582845; Tue, 27 Dec 2011 23:33:02 -0800 (PST) Received: from localhost.localdomain (220-132-160-32.HINET-IP.hinet.net. [220.132.160.32]) by mx.google.com with ESMTPS id r18sm99481364ibh.4.2011.12.27.23.33.00 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 27 Dec 2011 23:33:02 -0800 (PST) From: jungwalk@gmail.com To: hostap@lists.shmoo.com Subject: [PATCH] Cancel previous registered wps_registrar_pbc_timeout. Date: Wed, 28 Dec 2011 15:30:44 +0800 Message-Id: <1325057444-3765-1-git-send-email-jungwalk@gmail.com> X-Mailer: git-send-email 1.7.2.5 X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 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 From: Spencer Chang Since wps_registrar_pbc_timeout is called to stop PBC, then previous registered wps_registrar_pbc_timeout should be cancelled in case it is called again. Signed-off-by: Spencer Chang --- src/wps/wps_registrar.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c index eda1c70..e5e8d28 100644 --- a/src/wps/wps_registrar.c +++ b/src/wps/wps_registrar.c @@ -962,6 +962,7 @@ int wps_registrar_wps_cancel(struct wps_registrar *reg) if (reg->pbc) { wpa_printf(MSG_DEBUG, "WPS: PBC is set - cancelling it"); wps_registrar_pbc_timeout(reg, NULL); + eloop_cancel_timeout(wps_registrar_pbc_timeout, reg, NULL); return 1; } else if (reg->selected_registrar) { /* PIN Method */