WPS: Cancel previous registered wps_registrar_pbc_timeout
authorSpencer Chang <jungwalk@gmail.com>
Thu, 29 Dec 2011 19:32:06 +0000 (21:32 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 29 Dec 2011 19:32:06 +0000 (21:32 +0200)
Since wps_registrar_pbc_timeout is called to stop PBC, previously
registered wps_registrar_pbc_timeout must be canceled when canceling
the WPS operation.

Signed-off-by: Spencer Chang <jungwalk@gmail.com>
src/wps/wps_registrar.c

index eda1c70..e5e8d28 100644 (file)
@@ -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 */