From 6f80903f43f629b38c94e91f795311b5c3efcd74 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 1 Aug 2011 04:06:55 +0000 Subject: [PATCH] [TCPIP] - Cancel the disconnect timer if the disconnect is cancelled svn path=/trunk/; revision=53017 --- reactos/drivers/network/tcpip/tcpip/dispatch.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/reactos/drivers/network/tcpip/tcpip/dispatch.c b/reactos/drivers/network/tcpip/tcpip/dispatch.c index 6bc4cc4db77..75c1cfba41d 100644 --- a/reactos/drivers/network/tcpip/tcpip/dispatch.c +++ b/reactos/drivers/network/tcpip/tcpip/dispatch.c @@ -120,6 +120,7 @@ VOID NTAPI DispCancelRequest( PTRANSPORT_CONTEXT TranContext; PFILE_OBJECT FileObject; UCHAR MinorFunction; + PCONNECTION_ENDPOINT Connection; BOOLEAN DequeuedIrp = TRUE; IoReleaseCancelSpinLock(Irp->CancelIrql); @@ -171,7 +172,16 @@ VOID NTAPI DispCancelRequest( 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: