[ros-diffs] [cgutman] 53017: [TCPIP] - Cancel the disconnect timer if the disconnect is cancelled

cgutman at svn.reactos.org cgutman at svn.reactos.org
Mon Aug 1 04:06:55 UTC 2011


Author: cgutman
Date: Mon Aug  1 04:06:55 2011
New Revision: 53017

URL: http://svn.reactos.org/svn/reactos?rev=53017&view=rev
Log:
[TCPIP]
- Cancel the disconnect timer if the disconnect is cancelled

Modified:
    trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c

Modified: trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c?rev=53017&r1=53016&r2=53017&view=diff
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] Mon Aug  1 04:06:55 2011
@@ -120,6 +120,7 @@
     PTRANSPORT_CONTEXT TranContext;
     PFILE_OBJECT FileObject;
     UCHAR MinorFunction;
+    PCONNECTION_ENDPOINT Connection;
     BOOLEAN DequeuedIrp = TRUE;
 
     IoReleaseCancelSpinLock(Irp->CancelIrql);
@@ -171,7 +172,16 @@
         break;
             
     case TDI_DISCONNECT:
+        Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext;
+
         DequeuedIrp = TCPRemoveIRP(TranContext->Handle.ConnectionContext, Irp);
+        if (DequeuedIrp)
+        {
+            if (KeCancelTimer(&Connection->DisconnectTimer))
+            {
+                DereferenceObject(Connection);
+            }
+        }
         break;
 
     default:




More information about the Ros-diffs mailing list