]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-remove-active_vcp-20060410
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 10 Apr 2006 18:57:33 +0000 (18:57 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 10 Apr 2006 18:57:33 +0000 (18:57 +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.

src/WINNT/afsd/smb.c

index a3af1f045c02384bf294c6e3289677aeac3a8721..115a45fe5dbeef294a94ce8680fd55979ba9e462 100644 (file)
@@ -38,8 +38,6 @@
 static char *illegalChars = "\\/:*?\"<>|";
 BOOL isWindows2000 = FALSE;
 
-smb_vc_t *active_vcp = NULL;
-
 int smbShutdownFlag = 0;
 
 int smb_LogoffTokenTransfer;
@@ -7326,25 +7324,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;
 }