We must not wait for the reply of the registrar - this fixes a deadlock between
the registrar and the app_server. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20013 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+5
-10
@@ -1738,6 +1738,8 @@ BRoster::_ApplicationCrashed(team_id team)
|
|||||||
Tells the registrar which application is currently active.
|
Tells the registrar which application is currently active.
|
||||||
It's called from within the app_server when the active application is
|
It's called from within the app_server when the active application is
|
||||||
changed.
|
changed.
|
||||||
|
As it's called in the event loop, it must run asynchronously and cannot
|
||||||
|
wait for a reply.
|
||||||
*/
|
*/
|
||||||
status_t
|
status_t
|
||||||
BRoster::_UpdateActiveApp(team_id team) const
|
BRoster::_UpdateActiveApp(team_id team) const
|
||||||
@@ -1748,18 +1750,11 @@ BRoster::_UpdateActiveApp(team_id team) const
|
|||||||
// compose the request message
|
// compose the request message
|
||||||
BMessage request(B_REG_UPDATE_ACTIVE_APP);
|
BMessage request(B_REG_UPDATE_ACTIVE_APP);
|
||||||
status_t status = request.AddInt32("team", team);
|
status_t status = request.AddInt32("team", team);
|
||||||
|
if (status < B_OK)
|
||||||
|
return status;
|
||||||
|
|
||||||
// send the request
|
// send the request
|
||||||
BMessage reply;
|
return fMessenger.SendMessage(&request);
|
||||||
if (status == B_OK)
|
|
||||||
status = fMessenger.SendMessage(&request, &reply);
|
|
||||||
|
|
||||||
// evaluate the reply
|
|
||||||
if (status == B_OK && reply.what != B_REG_SUCCESS
|
|
||||||
&& reply.FindInt32("error", &status) != B_OK)
|
|
||||||
status = B_ERROR;
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user