mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
event.c: Don't infinite loop while completing a zero-length read.
tcp.c: Correctly pass on length in recv. svn path=/trunk/; revision=10999
This commit is contained in:
parent
0dbb29fa23
commit
d774499bf8
2 changed files with 8 additions and 4 deletions
|
@ -91,12 +91,15 @@ int TCPSocketState(void *ClientData,
|
|||
("Completing Receive Request: %x\n",
|
||||
Bucket->Request));
|
||||
|
||||
Complete( Bucket->Request.RequestContext,
|
||||
STATUS_SUCCESS,
|
||||
Received );
|
||||
} else {
|
||||
Complete( Bucket->Request.RequestContext,
|
||||
STATUS_SUCCESS, Received );
|
||||
} else if( Status == STATUS_SUCCESS ) {
|
||||
InsertHeadList( &Connection->ReceiveRequest,
|
||||
&Bucket->Entry );
|
||||
break;
|
||||
} else {
|
||||
Complete( Bucket->Request.RequestContext, Status, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -317,6 +317,7 @@ NTSTATUS TCPReceiveData
|
|||
Status = STATUS_PENDING;
|
||||
} else {
|
||||
TI_DbgPrint(MID_TRACE,("Got status %x, bytes %d\n", Status, Received));
|
||||
*BytesReceived = Received;
|
||||
}
|
||||
|
||||
KeReleaseSpinLock(&Connection->Lock, OldIrql);
|
||||
|
|
Loading…
Reference in a new issue