* Obviously not one of my best days today: the SERVER_GET_MEDIA_FILE_{ITEMS|TYPES}

commands used a mix of old and new transfer_area() semantics, which didn't work
  out too well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34558 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-12-08 15:31:08 +00:00
parent 300b908999
commit 8f70123737

View File

@ -724,13 +724,13 @@ ServerApp::_HandleMessage(int32 code, void* data, size_t size)
data); data);
server_get_media_types_reply reply; server_get_media_types_reply reply;
reply.area = gMediaFilesManager->GetTypesArea(reply.count); area_id area = gMediaFilesManager->GetTypesArea(reply.count);
if (reply.area >= 0) { if (area >= 0) {
// transfer the area to the target team // transfer the area to the target team
status_t status = _kern_transfer_area(reply.area, reply.area = _kern_transfer_area(area, &reply.address,
&reply.address, B_ANY_ADDRESS, request.team); B_ANY_ADDRESS, request.team);
if (status != B_OK) { if (reply.area < 0) {
delete_area(reply.area); delete_area(area);
reply.area = B_ERROR; reply.area = B_ERROR;
reply.count = 0; reply.count = 0;
} }
@ -756,8 +756,8 @@ ServerApp::_HandleMessage(int32 code, void* data, size_t size)
reply.count); reply.count);
if (area >= 0) { if (area >= 0) {
// transfer the area to the target team // transfer the area to the target team
reply.area = _kern_transfer_area(reply.area, reply.area = _kern_transfer_area(area, &reply.address,
&reply.address, B_ANY_ADDRESS, request.team); B_ANY_ADDRESS, request.team);
if (reply.area < 0) { if (reply.area < 0) {
delete_area(area); delete_area(area);
reply.area = B_ERROR; reply.area = B_ERROR;