From a2a4d75745c3bc7f7a68bdfd4a349008d8921a98 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 29 Jan 2020 15:42:13 +0100 Subject: [PATCH] method: Cleanup get_result() fIsSuccess is already set to TRUE by module::get_result(). Signed-off-by: Simon Rozman --- lib/EapHost/src/Method.cpp | 4 +--- lib/GTC/src/Method.cpp | 4 +--- lib/MSCHAPv2/src/Method.cpp | 4 +--- lib/PAP/src/Method.cpp | 4 +--- lib/TTLS/src/Method.cpp | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/lib/EapHost/src/Method.cpp b/lib/EapHost/src/Method.cpp index d4a4f50..c5ee64c 100644 --- a/lib/EapHost/src/Method.cpp +++ b/lib/EapHost/src/Method.cpp @@ -199,10 +199,8 @@ void eap::method_eaphost::get_result( if (reason == EapPeerMethodResultSuccess) m_cfg.m_last_status = config_method::status_t::success; - // 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. + // Ask EAP host to save the configuration (connection data). pResult->fSaveConnectionData = TRUE; - pResult->fIsSuccess = TRUE; } else if (error) throw eap_runtime_error(*error , __FUNCTION__ " EapHostPeerGetResult failed."); else diff --git a/lib/GTC/src/Method.cpp b/lib/GTC/src/Method.cpp index 91f92f9..00590c2 100644 --- a/lib/GTC/src/Method.cpp +++ b/lib/GTC/src/Method.cpp @@ -130,10 +130,8 @@ void eap::method_gtc::get_result( if (reason == EapPeerMethodResultSuccess) m_cfg.m_last_status = config_method::status_t::success; - // 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. + // Ask EAP host to save the configuration (connection data). pResult->fSaveConnectionData = TRUE; - pResult->fIsSuccess = TRUE; } diff --git a/lib/MSCHAPv2/src/Method.cpp b/lib/MSCHAPv2/src/Method.cpp index 9069e27..8741a6f 100644 --- a/lib/MSCHAPv2/src/Method.cpp +++ b/lib/MSCHAPv2/src/Method.cpp @@ -110,10 +110,8 @@ void eap::method_mschapv2_base::get_result( if (reason == EapPeerMethodResultSuccess) m_cfg.m_last_status = config_method::status_t::success; - // 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. + // Ask EAP host to save the configuration (connection data). pResult->fSaveConnectionData = TRUE; - pResult->fIsSuccess = TRUE; } diff --git a/lib/PAP/src/Method.cpp b/lib/PAP/src/Method.cpp index 1880f5c..175546d 100644 --- a/lib/PAP/src/Method.cpp +++ b/lib/PAP/src/Method.cpp @@ -139,8 +139,6 @@ void eap::method_pap_diameter::get_result( if (reason == EapPeerMethodResultSuccess) m_cfg.m_last_status = config_method::status_t::success; - // 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. + // Ask EAP host to save the configuration (connection data). pResult->fSaveConnectionData = TRUE; - pResult->fIsSuccess = TRUE; } diff --git a/lib/TTLS/src/Method.cpp b/lib/TTLS/src/Method.cpp index fe72eae..fb17d3a 100644 --- a/lib/TTLS/src/Method.cpp +++ b/lib/TTLS/src/Method.cpp @@ -873,10 +873,8 @@ void eap::method_ttls::get_result( dynamic_cast(m_module).spawn_crl_check(std::move(m_sc_cert)); } - // 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. + // Ask EAP host to save the configuration (connection data). pResult->fSaveConnectionData = TRUE; - pResult->fIsSuccess = TRUE; }