From: Jeffrey Altman Date: Sun, 26 Feb 2012 19:45:43 +0000 (-0500) Subject: Windows: disable Adv ICF support if not supported X-Git-Tag: upstream/1.6.1.pre4^2~6 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=13546c8d03b9dfaa753523e320f7ef901bc24c8b;p=packages%2Fo%2Fopenafs.git Windows: disable Adv ICF support if not supported OpenAFS 1.6.x does not require the use of SDK 6.0 or above. Therefore the Advanced Internet Connection Firewall support may not be available. In particular, the 32-bit distribution for 1.6.x does not rely on SDK 6.0 or higher. This is a 1.6.x only change. Reviewed-on: http://gerrit.openafs.org/6841 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c533e10d2bb5d6f22ee54e2c43af06f13db037d1) Change-Id: Id4269d2af010ac832ef17db8fb82e82409aab81b Reviewed-on: http://gerrit.openafs.org/6842 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/WINNT/afsd/afsicf.cpp b/src/WINNT/afsd/afsicf.cpp index 1837302a7..ec1361f37 100644 --- a/src/WINNT/afsd/afsicf.cpp +++ b/src/WINNT/afsd/afsicf.cpp @@ -100,6 +100,7 @@ global_afs_port_t afs_serverPorts[] = { #endif }; +#ifdef NET_FW_PROFILE2_ALL HRESULT icf_CheckAndAddPorts2(WCHAR * wServiceName, global_afs_port_t * ports, int nPorts) { INetFwPolicy2 *pNetFwPolicy2 = NULL; @@ -266,7 +267,7 @@ HRESULT icf_CheckAndAddPorts2(WCHAR * wServiceName, global_afs_port_t * ports, i return 0; } - +#endif /* NET_FW_PROFILE2_ALL */ HRESULT icf_OpenFirewallProfile(INetFwProfile ** fwProfile) { @@ -483,8 +484,11 @@ long icf_CheckAndAddAFSPorts(int portset) { // not necessarily catastrophic if the call failed. We'll try to // continue as if it succeeded. +#ifdef NET_FW_PROFILE2_ALL hr = icf_CheckAndAddPorts2(wServiceName, ports, nports); - if (FAILED(hr)) { + if (FAILED(hr)) +#endif + { DEBUGOUT(("INetFwProfile2 failed, trying INetFwProfile\n")); hr = icf_OpenFirewallProfile(&fwProfile); if (FAILED(hr)) {