mirror of
https://github.com/reactos/reactos.git
synced 2024-09-03 17:19:20 +00:00
- We must complete the IRP if we fail because the function we were called from expects the IRP to be completed after this call
- Return the correct status svn path=/branches/aicom-network-fixes/; revision=35038
This commit is contained in:
parent
dfd8d6b0c0
commit
ca91433bbc
|
@ -18,7 +18,10 @@ static VOID SatisfyAccept( PAFD_DEVICE_EXTENSION DeviceExt,
|
|||
PAFD_TDI_OBJECT_QELT Qelt ) {
|
||||
PAFD_FCB FCB = NewFileObject->FsContext;
|
||||
|
||||
if( !SocketAcquireStateLock( FCB ) ) return;
|
||||
if( !SocketAcquireStateLock( FCB ) ) {
|
||||
LostSocket( Irp );
|
||||
return;
|
||||
}
|
||||
|
||||
/* Transfer the connection to the new socket, launch the opening read */
|
||||
AFD_DbgPrint(MID_TRACE,("Completing a real accept (FCB %x)\n", FCB));
|
||||
|
@ -203,7 +206,6 @@ NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
|||
|
||||
NTSTATUS AfdWaitForListen( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||
PIO_STACK_LOCATION IrpSp ) {
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
PFILE_OBJECT FileObject = IrpSp->FileObject;
|
||||
PAFD_FCB FCB = FileObject->FsContext;
|
||||
|
||||
|
@ -226,7 +228,7 @@ NTSTATUS AfdWaitForListen( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
|||
PollReeval( FCB->DeviceExt, FCB->FileObject );
|
||||
|
||||
SocketStateUnlock( FCB );
|
||||
return Status;
|
||||
return Irp->IoStatus.Status;
|
||||
} else {
|
||||
AFD_DbgPrint(MID_TRACE,("Holding\n"));
|
||||
|
||||
|
@ -311,10 +313,9 @@ NTSTATUS AfdAccept( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
|||
FCB->PollState &= ~AFD_EVENT_ACCEPT;
|
||||
|
||||
SocketStateUnlock( FCB );
|
||||
return Status;
|
||||
return Irp->IoStatus.Status;
|
||||
}
|
||||
}
|
||||
|
||||
SocketStateUnlock( FCB );
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, 0 , NULL );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue