aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-12-19 20:34:18 (GMT)
committerJouni Malinen <j@w1.fi>2008-12-19 20:34:18 (GMT)
commitad5302a1cac57b28cba1147c7fc90807e0959c48 (patch)
tree759700568e79555ccb8b965006f7ef9ba8bc613d /wpa_supplicant
parent469fc3a41f6ca46c7e46d6fd5762e9aa03369f1f (diff)
downloadhostap-06-ad5302a1cac57b28cba1147c7fc90807e0959c48.zip
hostap-06-ad5302a1cac57b28cba1147c7fc90807e0959c48.tar.gz
hostap-06-ad5302a1cac57b28cba1147c7fc90807e0959c48.tar.bz2
WPS: Added event callback for successfully completed registration
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_gui-qt4/wpagui.cpp2
-rw-r--r--wpa_supplicant/wps_supplicant.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
index dc555ab..e6bdf52 100644
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
@@ -806,6 +806,8 @@ void WpaGui::processMsg(char *msg)
wpsStatusText->setText("Registrar does not yet know PIN");
} else if (str_match(pos, WPS_EVENT_FAIL)) {
wpsStatusText->setText("Registration failed");
+ } else if (str_match(pos, WPS_EVENT_SUCCESS)) {
+ wpsStatusText->setText("Registration succeeded");
}
}
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 1babe86..1ceabc9 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -198,6 +198,12 @@ static void wpa_supplicant_wps_event_fail(struct wpa_supplicant *wpa_s,
}
+static void wpa_supplicant_wps_event_success(struct wpa_supplicant *wpa_s)
+{
+ wpa_msg(wpa_s, MSG_INFO, WPS_EVENT_SUCCESS);
+}
+
+
static void wpa_supplicant_wps_event(void *ctx, enum wps_event event,
union wps_event_data *data)
{
@@ -209,6 +215,9 @@ static void wpa_supplicant_wps_event(void *ctx, enum wps_event event,
case WPS_EV_FAIL:
wpa_supplicant_wps_event_fail(wpa_s, &data->fail);
break;
+ case WPS_EV_SUCCESS:
+ wpa_supplicant_wps_event_success(wpa_s);
+ break;
}
}