* If getting a new port message failed, we must release the port's write sem
again, or else the port loses capacity. * This fixes bug #2720. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30517 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
819c98a383
commit
c39ecc608f
@ -1192,8 +1192,12 @@ writev_port_etc(port_id id, int32 msgCode, const iovec *msgVecs,
|
||||
return status;
|
||||
|
||||
msg = get_port_msg(msgCode, bufferSize);
|
||||
if (msg == NULL)
|
||||
if (msg == NULL) {
|
||||
// Give up our slot in the queue again, and let someone else try and fail
|
||||
// TODO: try to free some resources and try again?
|
||||
release_sem(cachedSem);
|
||||
return B_NO_MEMORY;
|
||||
}
|
||||
|
||||
// sender credentials
|
||||
msg->sender = geteuid();
|
||||
|
Loading…
x
Reference in New Issue
Block a user