From: Jeffrey Altman Date: Wed, 12 Mar 2014 16:39:59 +0000 (-0400) Subject: Windows: NP AFSGetConnection retrieve AuthId sooner X-Git-Tag: upstream/1.8.0_pre1^2~774 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8a6732f9f6d876fc20f5612a4b325533d157d091;p=packages%2Fo%2Fopenafs.git Windows: NP AFSGetConnection retrieve AuthId sooner When processing a network provider GetConnection requestion obtain the Authentication Logon Session Id earlier in the function so that it can be logged as part of subsequent trace messages. Change-Id: Ifef7d2da44e0266683b93bc76f25ee825294062c Reviewed-on: http://gerrit.openafs.org/10898 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 466084fc8..51eab1eda 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSNetworkProviderSupport.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSNetworkProviderSupport.cpp @@ -548,6 +548,17 @@ AFSGetConnection( IN AFSNetworkProviderConnectionCB *ConnectCB, __Enter { + if( ConnectCB->AuthenticationId.QuadPart == 0) + { + + ConnectCB->AuthenticationId = AFSGetAuthenticationId(); + + AFSDbgTrace(( AFS_SUBSYSTEM_NETWORK_PROVIDER, + AFS_TRACE_LEVEL_VERBOSE, + "AFSGetConnection Retrieved authentication id %I64X\n", + ConnectCB->AuthenticationId.QuadPart)); + } + if( ConnectCB->LocalName != L'\0') { @@ -572,17 +583,6 @@ AFSGetConnection( IN AFSNetworkProviderConnectionCB *ConnectCB, &pRDRDevExt->Specific.RDR.ProviderListLock, PsGetCurrentThread())); - if( ConnectCB->AuthenticationId.QuadPart == 0) - { - - ConnectCB->AuthenticationId = AFSGetAuthenticationId(); - - AFSDbgTrace(( AFS_SUBSYSTEM_NETWORK_PROVIDER, - AFS_TRACE_LEVEL_VERBOSE, - "AFSGetConnection Retrieved authentication id %I64X\n", - ConnectCB->AuthenticationId.QuadPart)); - } - AFSAcquireShared( &pRDRDevExt->Specific.RDR.ProviderListLock, TRUE);