Author: cgutman Date: Mon Oct 5 04:31:16 2009 New Revision: 43297
URL: http://svn.reactos.org/svn/reactos?rev=43297&view=rev Log: - Remove the STATUS_PENDING case in UnlockAndMaybeComplete so we can catch pending IRPs which didn't get queued in the PendingIrpList
Modified: trunk/reactos/drivers/network/afd/afd/lock.c
Modified: trunk/reactos/drivers/network/afd/afd/lock.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/loc... ============================================================================== --- trunk/reactos/drivers/network/afd/afd/lock.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/lock.c [iso-8859-1] Mon Oct 5 04:31:16 2009 @@ -290,22 +290,12 @@ NTSTATUS NTAPI UnlockAndMaybeComplete ( PAFD_FCB FCB, NTSTATUS Status, PIRP Irp, UINT Information ) { - Irp->IoStatus.Status = Status; Irp->IoStatus.Information = Information; - - if( Status == STATUS_PENDING ) { - /* We should firstly mark this IRP as pending, because - otherwise it may be completed by StreamSocketConnectComplete() - before we return from SocketStateUnlock(). */ - IoMarkIrpPending( Irp ); - SocketStateUnlock( FCB ); - } else { - if ( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); - (void)IoSetCancelRoutine(Irp, NULL); - SocketStateUnlock( FCB ); - IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); - } + if ( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); + (void)IoSetCancelRoutine(Irp, NULL); + SocketStateUnlock( FCB ); + IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); return Status; }
@@ -325,5 +315,6 @@ &Irp->Tail.Overlay.ListEntry ); IoMarkIrpPending(Irp); (void)IoSetCancelRoutine(Irp, AfdCancelHandler); - return UnlockAndMaybeComplete( FCB, STATUS_PENDING, Irp, 0 ); -} + SocketStateUnlock( FCB ); + return STATUS_PENDING; +}