Both XML selection namespaces (eap-metadata and eaphostconfig) are configured now
This commit is contained in:
parent
583fc19da7
commit
ce05418d8e
@ -130,8 +130,10 @@ DWORD WINAPI EapPeerConfigXml2Blob(
|
|||||||
else if (!pdwConnectionDataOutSize)
|
else if (!pdwConnectionDataOutSize)
|
||||||
g_peer.log_error(*ppEapError = g_peer.make_error(dwResult = ERROR_INVALID_PARAMETER, _T(__FUNCTION__) _T(" pdwConnectionDataOutSize is NULL.")));
|
g_peer.log_error(*ppEapError = g_peer.make_error(dwResult = ERROR_INVALID_PARAMETER, _T(__FUNCTION__) _T(" pdwConnectionDataOutSize is NULL.")));
|
||||||
else {
|
else {
|
||||||
|
// Configure XML selection namespaces used.
|
||||||
|
pConfigDoc->setProperty(bstr(L"SelectionNamespaces"), variant(L"xmlns:eap-metadata=\"urn:ietf:params:xml:ns:yang:ietf-eap-metadata\" xmlns:eaphostconfig=\"http://www.microsoft.com/provisioning/EapHostConfig\""));
|
||||||
|
|
||||||
// <Config>
|
// <Config>
|
||||||
pConfigDoc->setProperty(bstr(L"SelectionNamespaces"), variant(L"xmlns:eaphostconfig=\"http://www.microsoft.com/provisioning/EapHostConfig\""));
|
|
||||||
com_obj<IXMLDOMElement> pXmlElConfig;
|
com_obj<IXMLDOMElement> pXmlElConfig;
|
||||||
if (FAILED(eapxml::select_element(pConfigDoc, bstr(L"//eaphostconfig:Config"), pXmlElConfig))) {
|
if (FAILED(eapxml::select_element(pConfigDoc, bstr(L"//eaphostconfig:Config"), pXmlElConfig))) {
|
||||||
g_peer.log_error(*ppEapError = g_peer.make_error(dwResult = ERROR_INVALID_PARAMETER, _T(__FUNCTION__) _T(" Error reading <Config> element.")));
|
g_peer.log_error(*ppEapError = g_peer.make_error(dwResult = ERROR_INVALID_PARAMETER, _T(__FUNCTION__) _T(" Error reading <Config> element.")));
|
||||||
@ -139,7 +141,6 @@ DWORD WINAPI EapPeerConfigXml2Blob(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load configuration.
|
// Load configuration.
|
||||||
pConfigDoc->setProperty(bstr(L"SelectionNamespaces"), variant(L"xmlns:eap-metadata=\"urn:ietf:params:xml:ns:yang:ietf-eap-metadata\""));
|
|
||||||
try {
|
try {
|
||||||
g_peer.config_xml2blob(dwFlags, pXmlElConfig, pConnectionDataOut, pdwConnectionDataOutSize);
|
g_peer.config_xml2blob(dwFlags, pXmlElConfig, pConnectionDataOut, pdwConnectionDataOutSize);
|
||||||
} catch (std::exception &err) {
|
} catch (std::exception &err) {
|
||||||
@ -212,9 +213,11 @@ DWORD WINAPI EapPeerConfigBlob2Xml(
|
|||||||
return dwResult;
|
return dwResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Configure XML selection namespaces used.
|
||||||
|
pConfigDoc->setProperty(bstr(L"SelectionNamespaces"), variant(L"xmlns:eap-metadata=\"urn:ietf:params:xml:ns:yang:ietf-eap-metadata\" xmlns:eaphostconfig=\"http://www.microsoft.com/provisioning/EapHostConfig\""));
|
||||||
|
|
||||||
// Select <Config> node.
|
// Select <Config> node.
|
||||||
com_obj<IXMLDOMNode> pXmlElConfig;
|
com_obj<IXMLDOMNode> pXmlElConfig;
|
||||||
pConfigDoc->setProperty(bstr(L"SelectionNamespaces"), variant(L"xmlns:eaphostconfig=\"http://www.microsoft.com/provisioning/EapHostConfig\""));
|
|
||||||
if (FAILED(eapxml::select_node(pConfigDoc, bstr(L"eaphostconfig:Config"), pXmlElConfig))) {
|
if (FAILED(eapxml::select_node(pConfigDoc, bstr(L"eaphostconfig:Config"), pXmlElConfig))) {
|
||||||
g_peer.log_error(*ppEapError = g_peer.make_error(dwResult = ERROR_NOT_FOUND, _T(__FUNCTION__) _T(" Error selecting <Config> element.")));
|
g_peer.log_error(*ppEapError = g_peer.make_error(dwResult = ERROR_NOT_FOUND, _T(__FUNCTION__) _T(" Error selecting <Config> element.")));
|
||||||
return dwResult;
|
return dwResult;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user