BMediaNode::WaitForMessage: protect it over negative timeouts
This commit is contained in:
parent
d6039d2b23
commit
90cdf5e42e
@ -343,6 +343,13 @@ BMediaNode::WaitForMessage(bigtime_t waitUntil, uint32 flags,
|
||||
char data[B_MEDIA_MESSAGE_SIZE];
|
||||
int32 message;
|
||||
ssize_t size;
|
||||
|
||||
// TODO: Investigate on this issue
|
||||
if (waitUntil < 0) {
|
||||
TRACE("BMediaNode::WaitForMessage: Negative timeout!\n");
|
||||
waitUntil = 0;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
size = read_port_etc(ControlPort(), &message, data,
|
||||
sizeof(data), B_ABSOLUTE_TIMEOUT, waitUntil);
|
||||
|
Loading…
x
Reference in New Issue
Block a user