fixes forwards of BMessages
iroster now works successfully git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11367 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1899,6 +1899,12 @@ PRINT(("BMessage::_send_(port: %ld, token: %ld, preferred: %d): "
|
|||||||
tmp_msg.fReplyRequired = fReplyRequired;
|
tmp_msg.fReplyRequired = fReplyRequired;
|
||||||
tmp_msg.fReplyTo = fReplyTo;
|
tmp_msg.fReplyTo = fReplyTo;
|
||||||
|
|
||||||
|
if (!reply_to.IsValid()) {
|
||||||
|
BMessenger::Private(reply_to).SetTo(fReplyTo.team, fReplyTo.port, fReplyTo.target, fReplyTo.preferred);
|
||||||
|
if (!reply_to.IsValid())
|
||||||
|
reply_to = be_app_messenger;
|
||||||
|
}
|
||||||
|
|
||||||
BMessage* self = const_cast<BMessage*>(this);
|
BMessage* self = const_cast<BMessage*>(this);
|
||||||
BMessenger::Private replyToPrivate(reply_to);
|
BMessenger::Private replyToPrivate(reply_to);
|
||||||
self->fPreferred = preferred;
|
self->fPreferred = preferred;
|
||||||
@@ -1925,7 +1931,7 @@ PRINT(("BMessage::_send_(port: %ld, token: %ld, preferred: %d): "
|
|||||||
}
|
}
|
||||||
self->fPreferred = tmp_msg.fPreferred;
|
self->fPreferred = tmp_msg.fPreferred;
|
||||||
self->fTarget = tmp_msg.fTarget;
|
self->fTarget = tmp_msg.fTarget;
|
||||||
self->fReplyRequired = tmp_msg.fReplyRequired;
|
self->fReplyRequired = false; //tmp_msg.fReplyRequired;
|
||||||
self->fReplyTo = tmp_msg.fReplyTo;
|
self->fReplyTo = tmp_msg.fReplyTo;
|
||||||
tmp_msg.init_data();
|
tmp_msg.init_data();
|
||||||
PRINT(("BMessage::_send_() done: %lx\n", err));
|
PRINT(("BMessage::_send_() done: %lx\n", err));
|
||||||
|
|||||||
@@ -350,15 +350,11 @@ status_t
|
|||||||
BMessenger::SendMessage(BMessage *message, BMessenger replyTo,
|
BMessenger::SendMessage(BMessage *message, BMessenger replyTo,
|
||||||
bigtime_t timeout) const
|
bigtime_t timeout) const
|
||||||
{
|
{
|
||||||
status_t error = (message ? B_OK : B_BAD_VALUE);
|
if (!message)
|
||||||
if (error == B_OK) {
|
return B_BAD_VALUE;
|
||||||
// If the reply messenger is invalid use the app messenger.
|
|
||||||
if (!replyTo.IsValid())
|
return message->_send_(fPort, fHandlerToken, fPreferredTarget,
|
||||||
replyTo = be_app_messenger;
|
timeout, false, replyTo);
|
||||||
error = message->_send_(fPort, fHandlerToken, fPreferredTarget,
|
|
||||||
timeout, false, replyTo);
|
|
||||||
}
|
|
||||||
return error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendMessage
|
// SendMessage
|
||||||
|
|||||||
Reference in New Issue
Block a user