EapHost credential prompt result evaluation fixed

This commit is contained in:
Simon Rozman 2017-02-02 11:35:41 +01:00
parent 6b81ea51d3
commit 260b78025c

View File

@ -342,6 +342,7 @@ void eap::peer_ttls_ui::invoke_identity_ui(
&identity._Myptr,
&error._Myptr,
NULL);
result = dwResult == ERROR_SUCCESS ? wxID_OK : wxID_CANCEL;
if (dwResult == ERROR_SUCCESS) {
// Inner EAP method provided credentials.
cred_inner->m_identity = identity.get();
@ -351,7 +352,6 @@ void eap::peer_ttls_ui::invoke_identity_ui(
// TODO: If we ever choose to store EapHost credentials to Windows Credential Manager, add a "Save credentials? Yes/No" prompt here and write them to Credential Manager.
} else if (dwResult == ERROR_CANCELLED) {
// Not really an error.
result = wxID_CANCEL;
} else if (error)
wxLogError(_("Invoking EAP identity UI failed (error %u, %s, %s)."), error->dwWinError, error->pRootCauseString, error->pRepairString);
else