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:
Jérôme Duval
2005-02-14 11:47:55 +00:00
parent 3a85b92372
commit 0d0f1600ef
2 changed files with 12 additions and 10 deletions
+7 -1
View File
@@ -1899,6 +1899,12 @@ PRINT(("BMessage::_send_(port: %ld, token: %ld, preferred: %d): "
tmp_msg.fReplyRequired = fReplyRequired;
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);
BMessenger::Private replyToPrivate(reply_to);
self->fPreferred = preferred;
@@ -1925,7 +1931,7 @@ PRINT(("BMessage::_send_(port: %ld, token: %ld, preferred: %d): "
}
self->fPreferred = tmp_msg.fPreferred;
self->fTarget = tmp_msg.fTarget;
self->fReplyRequired = tmp_msg.fReplyRequired;
self->fReplyRequired = false; //tmp_msg.fReplyRequired;
self->fReplyTo = tmp_msg.fReplyTo;
tmp_msg.init_data();
PRINT(("BMessage::_send_() done: %lx\n", err));
+5 -9
View File
@@ -350,15 +350,11 @@ status_t
BMessenger::SendMessage(BMessage *message, BMessenger replyTo,
bigtime_t timeout) const
{
status_t error = (message ? B_OK : B_BAD_VALUE);
if (error == B_OK) {
// If the reply messenger is invalid use the app messenger.
if (!replyTo.IsValid())
replyTo = be_app_messenger;
error = message->_send_(fPort, fHandlerToken, fPreferredTarget,
timeout, false, replyTo);
}
return error;
if (!message)
return B_BAD_VALUE;
return message->_send_(fPort, fHandlerToken, fPreferredTarget,
timeout, false, replyTo);
}
// SendMessage