From dddd393198bc066e0fea478baf719c97cd51ec53 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 23 Jun 2012 15:04:29 -0400 Subject: [PATCH] Windows: NPGetConnectionPerformance 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 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsrdr/npdll/AFS_Npdll.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/WINNT/afsrdr/npdll/AFS_Npdll.c b/src/WINNT/afsrdr/npdll/AFS_Npdll.c index 312e42d83..6de7d5341 100644 --- a/src/WINNT/afsrdr/npdll/AFS_Npdll.c +++ b/src/WINNT/afsrdr/npdll/AFS_Npdll.c @@ -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); -- 2.39.5