]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: NPGetConnectionPerformance
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 23 Jun 2012 19:04:29 +0000 (15:04 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Tue, 3 Jul 2012 16:30:48 +0000 (09:30 -0700)
Restore the implementation of NPGetConnectionPerformance
in AFSRDFSProvider.dll.  This time just return 0 for all fields
except for the preferred read/write size which is set to 64K.

When this function is not implemented at all, a query for
performance of a \\AFS path will be processed by the SMB
redirector.  This can result in a 20 second timeout while waiting
for the SMB Browser query for "AFS <20>" to complete.

Change-Id: I67f7a3f0bb20a4be791bc153109e4e91144e00af
Reviewed-on: http://gerrit.openafs.org/7645
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/npdll/AFS_Npdll.c

index 312e42d838d002df12d99de4ca74fdbe647974af..6de7d53414ac86864eb2279dc0a70b4b1970f5ea 100644 (file)
@@ -525,14 +525,14 @@ NPGetCaps( DWORD nIndex )
 
             //
             // No support for:
-            //   WNNC_CON_GETPERFORMANCE
             //   WNNC_CON_DEFER
             //
 
             rc = WNNC_CON_GETCONNECTIONS |
                  WNNC_CON_CANCELCONNECTION |
                  WNNC_CON_ADDCONNECTION |
-                 WNNC_CON_ADDCONNECTION3;
+                 WNNC_CON_ADDCONNECTION3 |
+                 WNNC_CON_GETPERFORMANCE;
 
             break;
         }
@@ -1842,10 +1842,10 @@ NPGetConnectionPerformance( LPCWSTR lpRemoteName,
         {
 
 #ifdef AFS_DEBUG_TRACE
-            AFSDbgPrint( L"NPGetConnectionPerformance AFSRDFS is disabled, returning WN_BAD_NETNAME\n");
+            AFSDbgPrint( L"NPGetConnectionPerformance AFSRDFS is disabled, returning WN_NET_ERROR\n");
 #endif
 
-            return WN_NO_NETWORK;
+            return WN_NET_ERROR;
         }
 
         AFSDbgPrint( L"NPGetConnectionPerformance Entry for remote connection %S\n",
@@ -1900,13 +1900,13 @@ NPGetConnectionPerformance( LPCWSTR lpRemoteName,
             try_return( dwReturn = WN_NOT_CONNECTED);
         }
 
-        lpNetConnectInfo->dwFlags = WNCON_DYNAMIC;
+        lpNetConnectInfo->dwFlags = 0;
 
-        lpNetConnectInfo->dwSpeed = 500;
+        lpNetConnectInfo->dwSpeed = 0;
 
         lpNetConnectInfo->dwDelay = 0;
 
-        lpNetConnectInfo->dwOptDataSize = 0x1000;
+        lpNetConnectInfo->dwOptDataSize = 0x10000;
 
         AFSDbgPrint( L"NPGetConnectionPerformance Successfully returned information for remote connection %S\n",
                      lpRemoteName);