[ros-diffs] [cgutman] 35480: - Don't forget about ConnectIrp (This fix was lost in the merge) - Don't destroy the same socket twice - Don't unlock the same socket twice - Don't destroy a socket with pending IRPs

cgutman at svn.reactos.org cgutman at svn.reactos.org
Wed Aug 20 16:56:13 CEST 2008


Author: cgutman
Date: Wed Aug 20 09:56:12 2008
New Revision: 35480

URL: http://svn.reactos.org/svn/reactos?rev=35480&view=rev
Log:
 - Don't forget about ConnectIrp (This fix was lost in the merge)
 - Don't destroy the same socket twice
 - Don't unlock the same socket twice
 - Don't destroy a socket with pending IRPs

Modified:
    branches/aicom-network-fixes/drivers/network/afd/afd/main.c

Modified: branches/aicom-network-fixes/drivers/network/afd/afd/main.c
URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/network/afd/afd/main.c?rev=35480&r1=35479&r2=35480&view=diff
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/main.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/main.c [iso-8859-1] Wed Aug 20 09:56:12 2008
@@ -208,18 +208,18 @@
     InFlightRequest[0] = FCB->ListenIrp;
     InFlightRequest[1] = FCB->ReceiveIrp;
     InFlightRequest[2] = FCB->SendIrp;
+    InFlightRequest[3] = FCB->ConnectIrp;
 
     /* Return early here because we might be called in the mean time. */
     if( !(FCB->Critical ||
           FCB->ListenIrp.InFlightRequest ||
           FCB->ReceiveIrp.InFlightRequest ||
-          FCB->SendIrp.InFlightRequest) ) {
+          FCB->SendIrp.InFlightRequest || 
+          FCB->ConnectIrp.InFlightRequest) ) {
 	AFD_DbgPrint(MIN_TRACE,("Leaving socket alive (%x %x %x)\n",
 				FCB->ListenIrp.InFlightRequest,
 				FCB->ReceiveIrp.InFlightRequest,
 				FCB->SendIrp.InFlightRequest));
-        SocketStateUnlock(FCB);
-        DestroySocket(FCB);
         Irp->IoStatus.Status = STATUS_SUCCESS;
         Irp->IoStatus.Information = 0;
         IoCompleteRequest(Irp, IO_NO_INCREMENT);
@@ -242,12 +242,13 @@
         }
 
         FCB->PendingClose = Irp;
+	DestroySocket( FCB );
+
         Irp->IoStatus.Status = STATUS_SUCCESS;
         Irp->IoStatus.Information = 0;
         IoCompleteRequest(Irp, IO_NO_INCREMENT);
     }
 
-    DestroySocket( FCB );
     AFD_DbgPrint(MID_TRACE, ("Returning success.\n"));
 
     return Irp->IoStatus.Status;



More information about the Ros-diffs mailing list