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:
@@ -534,7 +534,7 @@ WriterLocker::AcquireWriter(bool dontBlock, int32 bytesNeeded)
|
|||||||
// check, if we're first in queue, and if there is space to write
|
// check, if we're first in queue, and if there is space to write
|
||||||
if (fRequestOwner.IsFirstInQueues()) {
|
if (fRequestOwner.IsFirstInQueues()) {
|
||||||
fBytes = _CheckAvailableBytes();
|
fBytes = _CheckAvailableBytes();
|
||||||
if (fBytes > 0)
|
if (fBytes >= bytesNeeded)
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user