[AFD]: BytesAvailable needs to be updated even when peeking so we don't run off the end of our buffer

svn path=/trunk/; revision=48405
This commit is contained in:
Cameron Gutman 2010-08-01 23:52:23 +00:00
parent a7c693ea78
commit caa555a453

View file

@ -122,11 +122,10 @@ static NTSTATUS TryToSatisfyRecvRequestFromBuffer( PAFD_FCB FCB,
*TotalBytesCopied += BytesToCopy;
FcbBytesCopied += BytesToCopy;
BytesAvailable -= BytesToCopy;
if (!(RecvReq->TdiFlags & TDI_RECEIVE_PEEK)) {
if (!(RecvReq->TdiFlags & TDI_RECEIVE_PEEK))
FCB->Recv.BytesUsed += BytesToCopy;
BytesAvailable -= BytesToCopy;
}
}
}