method_eaphost is no longer method_noneap child but correctly a method child

This commit is contained in:
Simon Rozman 2016-10-27 14:13:02 +02:00
parent 55f160bce3
commit 6f30239ada
2 changed files with 7 additions and 5 deletions

View File

@ -37,7 +37,7 @@ namespace eap
namespace eap namespace eap
{ {
class method_eaphost : public method_noneap class method_eaphost : public method
{ {
WINSTD_NONCOPYABLE(method_eaphost) WINSTD_NONCOPYABLE(method_eaphost)

View File

@ -30,14 +30,14 @@ using namespace winstd;
eap::method_eaphost::method_eaphost(_In_ module &module, _In_ config_method_eaphost &cfg, _In_ credentials_eaphost &cred) : eap::method_eaphost::method_eaphost(_In_ module &module, _In_ config_method_eaphost &cfg, _In_ credentials_eaphost &cred) :
m_session_id(0), m_session_id(0),
method_noneap(module, cfg, cred) method(module, cfg, cred)
{ {
} }
eap::method_eaphost::method_eaphost(_Inout_ method_eaphost &&other) : eap::method_eaphost::method_eaphost(_Inout_ method_eaphost &&other) :
m_session_id (std::move(other.m_session_id)), m_session_id (std::move(other.m_session_id)),
method_noneap(std::move(other )) method(std::move(other ))
{ {
} }
@ -45,7 +45,7 @@ eap::method_eaphost::method_eaphost(_Inout_ method_eaphost &&other) :
eap::method_eaphost& eap::method_eaphost::operator=(_Inout_ method_eaphost &&other) eap::method_eaphost& eap::method_eaphost::operator=(_Inout_ method_eaphost &&other)
{ {
if (this != std::addressof(other)) { if (this != std::addressof(other)) {
(method_noneap&)*this = std::move(other ); (method&)*this = std::move(other );
m_session_id = std::move(other.m_session_id); m_session_id = std::move(other.m_session_id);
} }
@ -78,7 +78,7 @@ void eap::method_eaphost::begin_session(
&error._Myptr); &error._Myptr);
if (dwResult == ERROR_SUCCESS) { if (dwResult == ERROR_SUCCESS) {
// Session succesfully created. // Session succesfully created.
method_noneap::begin_session(dwFlags, pAttributeArray, hTokenImpersonateUser, dwMaxSendPacketSize); method::begin_session(dwFlags, pAttributeArray, hTokenImpersonateUser, dwMaxSendPacketSize);
m_module.log_event(&EAPMETHOD_METHOD_HANDSHAKE_START2, event_data((unsigned int)m_cfg.get_method_id()), event_data::blank); m_module.log_event(&EAPMETHOD_METHOD_HANDSHAKE_START2, event_data((unsigned int)m_cfg.get_method_id()), event_data::blank);
} else if (error) } else if (error)
@ -90,6 +90,8 @@ void eap::method_eaphost::begin_session(
void eap::method_eaphost::end_session() void eap::method_eaphost::end_session()
{ {
method::end_session();
// End EapHost peer session. // End EapHost peer session.
eap_error_runtime error; eap_error_runtime error;
DWORD dwResult = EapHostPeerEndSession(m_session_id, &error._Myptr); DWORD dwResult = EapHostPeerEndSession(m_session_id, &error._Myptr);