WPS: Added event callback for successfully completed registration

This commit is contained in:
Jouni Malinen 2008-12-19 22:34:18 +02:00
parent 469fc3a41f
commit ad5302a1ca
8 changed files with 34 additions and 2 deletions

View file

@ -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");
}
}

View file

@ -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;
}
}