mirror of
https://github.com/reactos/reactos.git
synced 2024-11-19 05:22:59 +00:00
[AFD]
- Only indicate that receive is possible if there are no pending receive IRPs waiting for data - Don't attempt to receive on a connection which has been closed in the receive direction svn path=/trunk/; revision=52224
This commit is contained in:
parent
2c808bda98
commit
cbeac4750e
1 changed files with 5 additions and 3 deletions
|
@ -49,7 +49,8 @@ static BOOLEAN CantReadMore( PAFD_FCB FCB ) {
|
|||
static VOID RefillSocketBuffer( PAFD_FCB FCB ) {
|
||||
NTSTATUS Status;
|
||||
|
||||
if( !FCB->ReceiveIrp.InFlightRequest ) {
|
||||
if( !FCB->ReceiveIrp.InFlightRequest &&
|
||||
!(FCB->PollState & (AFD_EVENT_CLOSE | AFD_EVENT_ABORT)) ) {
|
||||
AFD_DbgPrint(MID_TRACE,("Replenishing buffer\n"));
|
||||
|
||||
Status = TdiReceive( &FCB->ReceiveIrp.InFlightRequest,
|
||||
|
@ -216,7 +217,8 @@ static NTSTATUS ReceiveActivity( PAFD_FCB FCB, PIRP Irp ) {
|
|||
}
|
||||
}
|
||||
|
||||
if( FCB->Recv.Content - FCB->Recv.BytesUsed ) {
|
||||
if( FCB->Recv.Content - FCB->Recv.BytesUsed &&
|
||||
IsListEmpty(&FCB->PendingIrpList[FUNCTION_RECV]) ) {
|
||||
FCB->PollState |= AFD_EVENT_RECEIVE;
|
||||
FCB->PollStatus[FD_READ_BIT] = STATUS_SUCCESS;
|
||||
PollReeval( FCB->DeviceExt, FCB->FileObject );
|
||||
|
@ -576,7 +578,7 @@ PacketSocketRecvComplete(
|
|||
}
|
||||
}
|
||||
|
||||
if( !IsListEmpty( &FCB->DatagramList ) ) {
|
||||
if( !IsListEmpty( &FCB->DatagramList ) && IsListEmpty(&FCB->PendingIrpList[FUNCTION_RECV]) ) {
|
||||
AFD_DbgPrint(MID_TRACE,("Signalling\n"));
|
||||
FCB->PollState |= AFD_EVENT_RECEIVE;
|
||||
FCB->PollStatus[FD_READ_BIT] = STATUS_SUCCESS;
|
||||
|
|
Loading…
Reference in a new issue