[haiku-commits] r35683 - haiku/trunk/src/kits/app

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 1 Mar 2010 00:28:27 +0100 (CET)

Author: anevilyak
Date: 2010-03-01 00:28:27 +0100 (Mon, 01 Mar 2010)
New Revision: 35683
Changeset: http://dev.haiku-os.org/changeset/35683/haiku

Modified:
   haiku/trunk/src/kits/app/Message.cpp
Log:
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).



Modified: haiku/trunk/src/kits/app/Message.cpp
===================================================================
--- haiku/trunk/src/kits/app/Message.cpp        2010-02-28 23:25:23 UTC (rev 
35682)
+++ haiku/trunk/src/kits/app/Message.cpp        2010-02-28 23:28:27 UTC (rev 
35683)
@@ -1082,24 +1082,8 @@
        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;
-               }
+       uint8 *address = (uint8 *)areaInfo.address;
 
-               fHeader->message_area = transfered;
-#endif
-       } else
-               address = (uint8 *)areaInfo.address;
-
        fFields = (field_header *)address;
        fData = address + fHeader->field_count * sizeof(field_header);
        return B_OK;


Other related posts:

  • » [haiku-commits] r35683 - haiku/trunk/src/kits/app - anevilyak