]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-windows-remove-active_vcp-20060410
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 10 Apr 2006 18:56:30 +0000 (18:56 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 10 Apr 2006 18:56:30 +0000 (18:56 +0000)
The 'active_vcp' variable is no longer being used for any useful
purpose and is the center of a race condition that could lead to
an undercount of references to 'vcp' objects.  Remove it.

(cherry picked from commit f1ef60c020feffb73b2aee4c1871afba039afb67)

src/WINNT/afsd/smb.c

index efed6f12bee088e0b5b0493631783b84d7d033f1..95505130cb9bb5eeff514705b9e620feb41a3964 100644 (file)
@@ -38,8 +38,6 @@
 static char *illegalChars = "\\/:*?\"<>|";
 BOOL isWindows2000 = FALSE;
 
-smb_vc_t *active_vcp = NULL;
-
 int smbShutdownFlag = 0;
 
 int smb_LogoffTokenTransfer;
@@ -7342,25 +7340,6 @@ void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
         smb_SendPacket(vcp, outp);
     thrd_Decrement(&ongoingOps);
 
-    if (!(vcp->flags & SMB_VCFLAG_ALREADYDEAD)) {
-        if (active_vcp != vcp) {
-            if (active_vcp) {
-                osi_Log2(smb_logp,
-                      "Replacing active_vcp %x with %x", active_vcp, vcp);
-                smb_ReleaseVC(active_vcp);
-            }
-            smb_HoldVC(vcp);
-           lock_ObtainWrite(&smb_globalLock);
-            active_vcp = vcp;
-           lock_ReleaseWrite(&smb_globalLock);
-        }
-        last_msg_time = GetTickCount();
-    } else if (active_vcp == vcp) {    /* the vcp is dead */
-        smb_ReleaseVC(active_vcp);
-       lock_ObtainWrite(&smb_globalLock);
-        active_vcp = NULL;
-       lock_ReleaseWrite(&smb_globalLock);
-    }
     return;
 }