Cleanup: BMessage::_Reference never hits the case of having to transfer the area since _SendMessage already takes care of this (and transfer_area doesn't allow it to take an area from another team anyways so this code never could have worked).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35683 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2010-02-28 23:28:27 +00:00
parent 4f85bc9f18
commit a3cd51c725

View File

@ -1082,23 +1082,7 @@ BMessage::_Reference()
if (result < B_OK)
return result;
uint8 *address = NULL;
thread_info threadInfo;
get_thread_info(find_thread(NULL), &threadInfo);
if (areaInfo.team != threadInfo.team) {
#ifndef HAIKU_TARGET_PLATFORM_LIBBE_TEST
// we are accessing a message from a port not owned by us
area_id transfered = _kern_transfer_area(fHeader->message_area,
(void **)&address, B_ANY_ADDRESS, threadInfo.team);
if (transfered < 0) {
debug_printf("BMessage: failed to transfer area into current team\n");
return transfered;
}
fHeader->message_area = transfered;
#endif
} else
address = (uint8 *)areaInfo.address;
uint8 *address = (uint8 *)areaInfo.address;
fFields = (field_header *)address;
fData = address + fHeader->field_count * sizeof(field_header);