From e3373c5ad24bf2ff858d1f33fa0dd65236c928de Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 16 Nov 2012 17:20:33 -0500 Subject: [PATCH] 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 --- src/WINNT/afsrdr/npdll/AFS_Npdll.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/WINNT/afsrdr/npdll/AFS_Npdll.c b/src/WINNT/afsrdr/npdll/AFS_Npdll.c index 066918d..f858388 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); -- 1.9.4