Windows: GetResourceInformation print path earlier
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 16 Nov 2012 22:20:33 +0000 (17:20 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Mon, 26 Nov 2012 21:23:45 +0000 (13:23 -0800)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/npdll/AFS_Npdll.c

index 066918d..f858388 100644 (file)
@@ -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);