From: Jeffrey Altman Date: Fri, 16 Nov 2012 22:20:33 +0000 (-0500) Subject: Windows: GetResourceInformation print path earlier X-Git-Tag: upstream/1.8.0_pre1^2~1784 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=e3373c5ad24bf2ff858d1f33fa0dd65236c928de;p=packages%2Fo%2Fopenafs.git Windows: GetResourceInformation print path earlier In the network provider, GetResourceInformation was logging the input resource path after the afs redirector chopped it up. Log it before the DeviceIoControl call. Change-Id: Icefcf65583b95fd46c8e28bd0e2c53258b5094fa Reviewed-on: http://gerrit.openafs.org/8509 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/npdll/AFS_Npdll.c b/src/WINNT/afsrdr/npdll/AFS_Npdll.c index 066918d37..f85838853 100644 --- a/src/WINNT/afsrdr/npdll/AFS_Npdll.c +++ b/src/WINNT/afsrdr/npdll/AFS_Npdll.c @@ -3194,6 +3194,18 @@ NPGetResourceInformation( LPNETRESOURCE lpNetResource, try_return( dwStatus = WN_NET_ERROR); } + uniRemoteName.Length = (USHORT)pConnectCB->RemoteNameLength; + uniRemoteName.MaximumLength = uniRemoteName.Length; + uniRemoteName.Buffer = pConnectCB->RemoteName; + +#ifdef AFS_DEBUG_TRACE + AFSDbgPrint( L"NPGetResourceInformation For remote name %wZ Scope %08lX Type %08lX Usage %08lX\n", + &uniRemoteName, + pConnectCB->Scope, + pConnectCB->Type, + pConnectCB->Usage); +#endif + dwError = DeviceIoControl( hControlDevice, IOCTL_AFS_GET_CONNECTION_INFORMATION, pConnectCB, @@ -3214,18 +3226,6 @@ NPGetResourceInformation( LPNETRESOURCE lpNetResource, try_return( dwStatus = WN_BAD_NETNAME); } - uniRemoteName.Length = (USHORT)pConnectCB->RemoteNameLength; - uniRemoteName.MaximumLength = uniRemoteName.Length; - uniRemoteName.Buffer = pConnectCB->RemoteName; - -#ifdef AFS_DEBUG_TRACE - AFSDbgPrint( L"NPGetResourceInformation For remote name %wZ Scope %08lX Type %08lX Usage %08lX\n", - &uniRemoteName, - pConnectCB->Scope, - pConnectCB->Type, - pConnectCB->Usage); -#endif - // Determine the space needed for this entry... ulRequiredLen = sizeof( NETRESOURCE);