- Fix a bug where Irp->IoStatus wasn't set if Status == STATUS_PENDING

svn path=/branches/aicom-network-fixes/; revision=35024
This commit is contained in:
Cameron Gutman 2008-08-02 03:51:17 +00:00
parent 80709d7858
commit dfd8d6b0c0

View file

@ -237,6 +237,9 @@ NTSTATUS NTAPI UnlockAndMaybeComplete
UINT Information,
PIO_COMPLETION_ROUTINE Completion ) {
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()
@ -246,8 +249,6 @@ NTSTATUS NTAPI UnlockAndMaybeComplete
} else {
if ( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) );
SocketStateUnlock( FCB );
Irp->IoStatus.Status = Status;
Irp->IoStatus.Information = Information;
if( Completion )
Completion( FCB->DeviceExt->DeviceObject, Irp, FCB );
IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );