Some EapHost peer helper classes introduced

This commit is contained in:
2016-09-30 15:19:43 +02:00
parent d029358086
commit 129b9c9a10
2 changed files with 138 additions and 0 deletions

View File

@@ -20,6 +20,8 @@
#include "StdAfx.h"
#pragma comment(lib, "Eappcfg.lib")
//////////////////////////////////////////////////////////////////////
// winstd::eap_attr
@@ -99,3 +101,33 @@ winstd::eap_packet::handle_type winstd::eap_packet::duplicate_internal(_In_ hand
return h2;
}
//////////////////////////////////////////////////////////////////////
// winstd::eap_method_info_array
//////////////////////////////////////////////////////////////////////
winstd::eap_method_info_array::~eap_method_info_array()
{
if (pEapMethods)
free_internal();
}
void winstd::eap_method_info_array::free_internal()
{
for (DWORD i = 0; i < dwNumberOfMethods; i++)
free_internal(pEapMethods + i);
EapHostPeerFreeMemory((BYTE*)pEapMethods);
}
void winstd::eap_method_info_array::free_internal(_In_ EAP_METHOD_INFO *pMethodInfo)
{
if (pMethodInfo->pInnerMethodInfo)
free_internal(pMethodInfo->pInnerMethodInfo);
EapHostPeerFreeMemory((BYTE*)pMethodInfo->pwszAuthorName);
EapHostPeerFreeMemory((BYTE*)pMethodInfo->pwszFriendlyName);
}