ppResult >> pResult

This commit is contained in:
Simon Rozman 2016-10-24 13:33:01 +02:00
parent 6f90cfaf99
commit a1f9a7bab9
10 changed files with 32 additions and 32 deletions

View File

@ -449,7 +449,7 @@ DWORD APIENTRY EapPeerGetResponsePacket(
DWORD APIENTRY EapPeerGetResult(
_In_ EAP_SESSION_HANDLE hSession,
_In_ EapPeerMethodResultReason reason,
_Out_ EapPeerMethodResult *ppResult,
_Out_ EapPeerMethodResult *pResult,
_Out_ EAP_ERROR **ppEapError)
{
DWORD dwResult = ERROR_SUCCESS;
@ -466,11 +466,11 @@ DWORD APIENTRY EapPeerGetResult(
if (!hSession)
g_peer.log_error(*ppEapError = g_peer.make_error(dwResult = ERROR_INVALID_PARAMETER, _T(__FUNCTION__) _T(" hSession is NULL.")));
else if (!ppResult)
g_peer.log_error(*ppEapError = g_peer.make_error(dwResult = ERROR_INVALID_PARAMETER, _T(__FUNCTION__) _T(" ppResult is NULL.")));
else if (!pResult)
g_peer.log_error(*ppEapError = g_peer.make_error(dwResult = ERROR_INVALID_PARAMETER, _T(__FUNCTION__) _T(" pResult is NULL.")));
else {
try {
g_peer.get_result(hSession, reason, ppResult);
g_peer.get_result(hSession, reason, pResult);
} catch (std::exception &err) {
g_peer.log_error(*ppEapError = g_peer.make_error(err));
dwResult = (*ppEapError)->dwWinError;

View File

@ -126,7 +126,7 @@ namespace eap
///
virtual void get_result(
_In_ EapPeerMethodResultReason reason,
_Inout_ EapPeerMethodResult *ppResult);
_Inout_ EapPeerMethodResult *pResult);
/// @}

View File

@ -737,7 +737,7 @@ namespace eap
virtual void get_result(
_In_ EAP_SESSION_HANDLE hSession,
_In_ EapPeerMethodResultReason reason,
_Inout_ EapPeerMethodResult *ppResult) = 0;
_Inout_ EapPeerMethodResult *pResult) = 0;
///
/// Obtains the user interface context from the EAP method.

View File

@ -83,9 +83,9 @@ void eap::method::end_session()
void eap::method::get_result(
_In_ EapPeerMethodResultReason reason,
_Inout_ EapPeerMethodResult *ppResult)
_Inout_ EapPeerMethodResult *pResult)
{
assert(ppResult);
assert(pResult);
switch (reason) {
case EapPeerMethodResultSuccess: {
@ -104,8 +104,8 @@ void eap::method::get_result(
// Always ask EAP host to save the connection data. And it will save it *only* when we report "success".
// Don't worry. EapHost is well aware of failed authentication condition.
ppResult->fSaveConnectionData = TRUE;
ppResult->fIsSuccess = TRUE;
pResult->fSaveConnectionData = TRUE;
pResult->fIsSuccess = TRUE;
}

View File

@ -128,7 +128,7 @@ namespace eap
///
virtual void get_result(
_In_ EapPeerMethodResultReason reason,
_Inout_ EapPeerMethodResult *ppResult);
_Inout_ EapPeerMethodResult *pResult);
/// @}

View File

@ -492,11 +492,11 @@ void eap::method_tls::get_response_packet(
void eap::method_tls::get_result(
_In_ EapPeerMethodResultReason reason,
_Inout_ EapPeerMethodResult *ppResult)
_Inout_ EapPeerMethodResult *pResult)
{
assert(ppResult);
assert(pResult);
method::get_result(reason, ppResult);
method::get_result(reason, pResult);
switch (reason) {
case EapPeerMethodResultSuccess: {

View File

@ -115,7 +115,7 @@ namespace eap
///
virtual void get_result(
_In_ EapPeerMethodResultReason reason,
_Inout_ EapPeerMethodResult *ppResult);
_Inout_ EapPeerMethodResult *pResult);
/// @}

View File

@ -165,7 +165,7 @@ namespace eap
virtual void get_result(
_In_ EAP_SESSION_HANDLE hSession,
_In_ EapPeerMethodResultReason reason,
_Inout_ EapPeerMethodResult *ppResult);
_Inout_ EapPeerMethodResult *pResult);
///
/// Obtains the user interface context from the EAP method.

View File

@ -123,17 +123,17 @@ void eap::method_ttls::get_response_packet(
void eap::method_ttls::get_result(
_In_ EapPeerMethodResultReason reason,
_Inout_ EapPeerMethodResult *ppResult)
_Inout_ EapPeerMethodResult *pResult)
{
// Do the TLS.
method_tls::get_result(reason, ppResult);
method_tls::get_result(reason, pResult);
if (m_phase == phase_application_data) {
// Get inner method result.
EapPeerMethodResult result = {};
m_inner->get_result(reason, &result);
if (result.fSaveConnectionData)
ppResult->fSaveConnectionData = TRUE;
pResult->fSaveConnectionData = TRUE;
if (m_inner->m_cfg.m_last_status != config_method::status_success) {
// Inner method admitted problems, so autentication must have proceeded to inner authentication already.

View File

@ -270,35 +270,35 @@ void eap::peer_ttls::get_response_packet(
void eap::peer_ttls::get_result(
_In_ EAP_SESSION_HANDLE hSession,
_In_ EapPeerMethodResultReason reason,
_Inout_ EapPeerMethodResult *ppResult)
_Inout_ EapPeerMethodResult *pResult)
{
auto s = static_cast<session*>(hSession);
s->m_method->get_result(reason, ppResult);
s->m_method->get_result(reason, pResult);
s->m_eap_attr_desc.dwNumberOfAttributes = (DWORD)s->m_method->m_eap_attr.size();
s->m_eap_attr_desc.pAttribs = s->m_method->m_eap_attr.data();
ppResult->pAttribArray = &s->m_eap_attr_desc;
pResult->pAttribArray = &s->m_eap_attr_desc;
// Do not report failure to EapHost, as it will not save updated configuration then. But we need it to save it, to alert user on next connection attempt.
// EapHost is well aware of the failed condition.
//ppResult->fIsSuccess = FALSE;
//ppResult->dwFailureReasonCode = EAP_E_AUTHENTICATION_FAILED;
ppResult->fIsSuccess = TRUE;
ppResult->dwFailureReasonCode = ERROR_SUCCESS;
//pResult->fIsSuccess = FALSE;
//pResult->dwFailureReasonCode = EAP_E_AUTHENTICATION_FAILED;
pResult->fIsSuccess = TRUE;
pResult->dwFailureReasonCode = ERROR_SUCCESS;
if (ppResult->fSaveConnectionData) {
pack(s->m_cfg, &ppResult->pConnectionData, &ppResult->dwSizeofConnectionData);
if (pResult->fSaveConnectionData) {
pack(s->m_cfg, &pResult->pConnectionData, &pResult->dwSizeofConnectionData);
if (s->m_blob_cfg)
free_memory(s->m_blob_cfg);
s->m_blob_cfg = ppResult->pConnectionData;
s->m_blob_cfg = pResult->pConnectionData;
}
#ifdef EAP_USE_NATIVE_CREDENTIAL_CACHE
ppResult->fSaveUserData = TRUE;
pack(s->m_cred, &ppResult->pUserData, &ppResult->dwSizeofUserData);
pResult->fSaveUserData = TRUE;
pack(s->m_cred, &pResult->pUserData, &pResult->dwSizeofUserData);
if (s->m_blob_cred)
free_memory(s->m_blob_cred);
s->m_blob_cred = ppResult->pUserData;
s->m_blob_cred = pResult->pUserData;
#endif
}