From: Jeffrey Altman Date: Thu, 21 Mar 2013 11:57:34 +0000 (-0400) Subject: Windows: NPAddConnection no local name and connected X-Git-Tag: upstream/1.8.0_pre1^2~1277 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a0b015ecb214f9d655b28b895093dbb09fd8f001;p=packages%2Fo%2Fopenafs.git Windows: NPAddConnection no local name and connected The WN_ALREADY_CONNECTED error is only to be returned if a local device name (aka drive letter) is provided in the request. Otherwise, the proper return status is WN_SUCCESS if an unnamed connection is requested. Change-Id: I1e1ca47a84e353db66e2830ec11f968a3578c4f6 Reviewed-on: http://gerrit.openafs.org/9642 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/kernel/lib/AFSNetworkProviderSupport.cpp b/src/WINNT/afsrdr/kernel/lib/AFSNetworkProviderSupport.cpp index c6cd352fc..9a9588cd2 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSNetworkProviderSupport.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSNetworkProviderSupport.cpp @@ -121,6 +121,8 @@ AFSAddConnection( IN AFSNetworkProviderConnectionCB *ConnectCB, &uniRemoteName, ConnectCB->LocalName, ConnectCB->AuthenticationId.QuadPart)); + + *ResultStatus = WN_ALREADY_CONNECTED; } else { @@ -130,13 +132,13 @@ AFSAddConnection( IN AFSNetworkProviderConnectionCB *ConnectCB, "AFSAddConnection ALREADY_CONNECTED remote name %wZ Local (NULL) authentication id %I64X\n", &uniRemoteName, ConnectCB->AuthenticationId.QuadPart)); - } - *ResultStatus = WN_ALREADY_CONNECTED; + *ResultStatus = WN_SUCCESS; + } *ReturnOutputBufferLength = sizeof( ULONG); - try_return( ntStatus); + try_return( ntStatus = STATUS_SUCCESS); } //