[PATCH] Cancel previous registered wps_registrar_pbc_timeout.

jungwalk at gmail.com jungwalk
Tue Dec 27 23:30:44 PST 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