mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
Implement support for MSG_PEEK.
Patch by Art Yerkes with small fix by me to make it working correctly. (verified with a test app) svn path=/trunk/; revision=33786
This commit is contained in:
parent
cb57056f4b
commit
923017639c
1 changed files with 11 additions and 5 deletions
|
@ -85,11 +85,14 @@ static NTSTATUS TryToSatisfyRecvRequestFromBuffer( PAFD_FCB FCB,
|
|||
|
||||
MmUnmapLockedPages( Map[i].BufferAddress, Map[i].Mdl );
|
||||
|
||||
FCB->Recv.BytesUsed += BytesToCopy;
|
||||
*TotalBytesCopied += BytesToCopy;
|
||||
|
||||
if (!(RecvReq->TdiFlags & TDI_RECEIVE_PEEK)) {
|
||||
FCB->Recv.BytesUsed += BytesToCopy;
|
||||
BytesAvailable -= BytesToCopy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If there's nothing left in our buffer start a new request */
|
||||
if( FCB->Recv.BytesUsed == FCB->Recv.Content ) {
|
||||
|
@ -405,8 +408,11 @@ SatisfyPacketRecvRequest( PAFD_FCB FCB, PIRP Irp,
|
|||
|
||||
MmUnmapLockedPages( Map[0].BufferAddress, Map[0].Mdl );
|
||||
|
||||
FCB->Recv.BytesUsed = 0;
|
||||
*TotalBytesCopied = BytesToCopy;
|
||||
|
||||
if (!RecvReq->TdiFlags & TDI_RECEIVE_PEEK) {
|
||||
FCB->Recv.BytesUsed = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Status = Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
|
|
Loading…
Reference in a new issue