Windows: NPGetResourceInformation return redir error
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 28 Jun 2015 17:43:03 +0000 (13:43 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 25 Sep 2015 03:26:44 +0000 (23:26 -0400)
When the redirector ioctl fails in NPGetResourceInformation() return the
actual error to the caller.   Do not hide all errors as WN_BAD_NETNAME.

Reviewed-on: http://gerrit.openafs.org/11915
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 2f072b2fe6e7d5927bd4e597614af7f62240ccb1)

Change-Id: If69250198d31b4ebd4a854c07e87bed96ef99aa2
Reviewed-on: http://gerrit.openafs.org/12035
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/npdll/AFS_Npdll.c

index 6487928..6950b52 100644 (file)
@@ -3196,13 +3196,14 @@ NPGetResourceInformation( LPNETRESOURCE   lpNetResource,
 
         if( !dwError)
         {
-#ifdef AFS_DEBUG_TRACE
-            DWORD gle = GetLastError();
+           dwStatus = GetLastError();
 
+#ifdef AFS_DEBUG_TRACE
             AFSDbgPrint( L"NPGetResourceInformation Failed to get connection info from file system for local %s gle 0x%x\n",
-                         lpNetResource->lpRemoteName, gle);
+                        lpNetResource->lpRemoteName, dwStatus);
 #endif
-            try_return( dwStatus = WN_BAD_NETNAME);
+
+           try_return( dwStatus);
         }
 
         // Determine the space needed for this entry...