[PATCH] Cancel previous registered wps_registrar_pbc_timeout.

jungwalk at gmail.com jungwalk at gmail.com
Wed Dec 28 02:30:44 EST 2011


From: Spencer Chang <jungwalk at gmail.com>

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 <jungwalk at gmail.com>
---
 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 */
-- 
1.7.2.5



More information about the HostAP mailing list