AcquireWriter() could succeed without fulfilling the bytesNeeded acquirement.

This fixes bug #477.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17490 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-05-17 14:09:36 +00:00
parent d41fb4db6e
commit 467a2ae6f8

View File

@ -534,7 +534,7 @@ WriterLocker::AcquireWriter(bool dontBlock, int32 bytesNeeded)
// check, if we're first in queue, and if there is space to write
if (fRequestOwner.IsFirstInQueues()) {
fBytes = _CheckAvailableBytes();
if (fBytes > 0)
if (fBytes >= bytesNeeded)
return B_OK;
}