[ros-diffs] [cgutman] 37605: - Make sure we're not trying to close the file object

cgutman at svn.reactos.org cgutman at svn.reactos.org
Mon Nov 24 03:59:38 CET 2008


Author: cgutman
Date: Sun Nov 23 20:59:37 2008
New Revision: 37605

URL: http://svn.reactos.org/svn/reactos?rev=37605&view=rev
Log:
 - Make sure we're not trying to close the file object

Modified:
    branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c

Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c
URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c?rev=37605&r1=37604&r2=37605&view=diff
==============================================================================
--- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] Sun Nov 23 20:59:37 2008
@@ -27,12 +27,17 @@
  */
 {
     KIRQL OldIrql;
+    PIO_STACK_LOCATION IrpSp;
+    PTRANSPORT_CONTEXT TransContext;
 
     TI_DbgPrint(DEBUG_IRP, ("Called.\n"));
 
+    IrpSp       = IoGetCurrentIrpStackLocation(Irp);
+    TransContext = (PTRANSPORT_CONTEXT)IrpSp->FileObject->FsContext;
+
     IoAcquireCancelSpinLock(&OldIrql);
 
-    if (!Irp->Cancel) {
+    if (!Irp->Cancel && !TransContext->CancelIrps) {
         (void)IoSetCancelRoutine(Irp, CancelRoutine);
         IoReleaseCancelSpinLock(OldIrql);
 



More information about the Ros-diffs mailing list