Windows: NP AFSGetConnection retrieve AuthId sooner
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 12 Mar 2014 16:39:59 +0000 (12:39 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Mon, 17 Mar 2014 21:11:27 +0000 (14:11 -0700)
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 <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/kernel/lib/AFSNetworkProviderSupport.cpp

index 466084f..51eab1e 100644 (file)
@@ -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);