Added B_CURRENT_TEAM support to get_team_info() as well - dunno though, if

BeOS supports this as well, at least it's not documented in the BeBook
(but it's useful anyway).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10259 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-11-26 16:37:41 +00:00
parent b9ead42463
commit 50edebb6cb

View File

@ -1602,8 +1602,12 @@ _get_team_info(team_id id, team_info *info, size_t size)
state = disable_interrupts();
GRAB_TEAM_LOCK();
team = team_get_team_struct_locked(id);
if (!team) {
if (id == B_CURRENT_TEAM)
team = thread_get_current_thread()->team;
else
team = team_get_team_struct_locked(id);
if (team == NULL) {
rc = B_BAD_TEAM_ID;
goto err;
}