diff options
author | Jouni Malinen <j@w1.fi> | 2009-11-21 18:39:12 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2009-11-21 18:39:12 +0200 |
commit | 11ff95783ec7746feaf579ede37714af16a68d7e (patch) | |
tree | 23b8d9ea8a8be038398ed7f18d251c0bcde48efa | |
parent | d914f7888082993e84fcbb5cdec6e108baecf561 (diff) | |
download | external_wpa_supplicant_8_ti-11ff95783ec7746feaf579ede37714af16a68d7e.zip external_wpa_supplicant_8_ti-11ff95783ec7746feaf579ede37714af16a68d7e.tar.gz external_wpa_supplicant_8_ti-11ff95783ec7746feaf579ede37714af16a68d7e.tar.bz2 |
WPS ER: Deinitialize protocol instance with STA after completion
In addition, remove the WPS ER Enrollee entry 10 seconds after
successful completion of the protocol run.
-rw-r--r-- | src/wps/wps_er.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wps/wps_er.c b/src/wps/wps_er.c index bedd60a..c88bee5 100644 --- a/src/wps/wps_er.c +++ b/src/wps/wps_er.c @@ -832,6 +832,18 @@ static void wps_er_sta_process(struct wps_er_sta *sta, struct wpabuf *msg, struct wpabuf *next = wps_get_msg(sta->wps, &op_code); if (next) wps_er_sta_send_msg(sta, next); + } else { + wpa_printf(MSG_DEBUG, "WPS ER: Protocol run %s with the " + "enrollee (res=%d)", + res == WPS_DONE ? "succeeded" : "failed", res); + wps_deinit(sta->wps); + sta->wps = NULL; + if (res == WPS_DONE) { + /* Remove the STA entry after short timeout */ + eloop_cancel_timeout(wps_er_sta_timeout, sta, NULL); + eloop_register_timeout(10, 0, wps_er_sta_timeout, sta, + NULL); + } } } |