* Sending a forwarded message that had required a synchronous reply, can now be sent
again with a synchronous reply - the "reply done" flag wasn't cleared before sending. * Improved error message in case the buffer for flattening the message couldn't be allocated. BTW this would be a good place to use the new writev_port() function and don't do any allocation at all. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17914 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
fb8a578c0a
commit
d134f89267
@ -1888,8 +1888,11 @@ BMessage::_SendMessage(port_id port, int32 token, bigtime_t timeout,
|
||||
} else {
|
||||
size = _NativeFlattenedSize();
|
||||
buffer = (char *)malloc(size);
|
||||
result = _NativeFlatten(buffer, size);
|
||||
header = (message_header *)buffer;
|
||||
if (buffer != NULL) {
|
||||
result = _NativeFlatten(buffer, size);
|
||||
header = (message_header *)buffer;
|
||||
} else
|
||||
result = B_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (result < B_OK)
|
||||
@ -1905,9 +1908,11 @@ BMessage::_SendMessage(port_id port, int32 token, bigtime_t timeout,
|
||||
|
||||
BMessenger::Private replyToPrivate(replyTo);
|
||||
|
||||
if (replyRequired)
|
||||
if (replyRequired) {
|
||||
header->flags |= MESSAGE_FLAG_REPLY_REQUIRED;
|
||||
|
||||
header->flags &= ~MESSAGE_FLAG_REPLY_DONE;
|
||||
}
|
||||
|
||||
header->target = token;
|
||||
header->reply_team = replyToPrivate.Team();
|
||||
header->reply_port = replyToPrivate.Port();
|
||||
|
Loading…
Reference in New Issue
Block a user