- Complete receive requests with the correct status if the socket is unexpectedly closed

svn path=/trunk/; revision=52400
This commit is contained in:
Cameron Gutman 2011-06-21 13:02:42 +00:00
parent 2792c9b294
commit 2b116b187c

View file

@ -163,14 +163,12 @@ static NTSTATUS ReceiveActivity( PAFD_FCB FCB, PIRP Irp ) {
TotalBytesCopied));
UnlockBuffers( RecvReq->BufferArray,
RecvReq->BufferCount, FALSE );
Status = NextIrp->IoStatus.Status =
FCB->Overread ? STATUS_END_OF_FILE : STATUS_SUCCESS;
Status = NextIrp->IoStatus.Status = FCB->PollStatus[FD_CLOSE_BIT];
NextIrp->IoStatus.Information = 0;
if( NextIrp == Irp ) RetStatus = Status;
if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) );
(void)IoSetCancelRoutine(NextIrp, NULL);
IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT );
FCB->Overread = TRUE;
}
} else {
/* Kick the user that receive would be possible now */