* Made _LaunchInputServer() more robust: when launching by signature fails,

we try its well-known location directly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26716 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-08-01 14:02:02 +00:00
parent 2e3477e3d8
commit d2d52d31ab

View File

@ -412,8 +412,24 @@ Desktop::_LaunchInputServer()
{
BRoster roster;
status_t status = roster.Launch("application/x-vnd.Be-input_server");
if (status != B_OK && status != B_ALREADY_RUNNING)
syslog(LOG_ERR, "Failed to launch the input server: %s!\n", strerror(status));
if (status == B_OK || status == B_ALREADY_RUNNING)
return;
// Could not load input_server by signature, try well-known location
BEntry entry("/system/servers/input_server");
entry_ref ref;
status_t entryStatus = entry.GetRef(&ref);
if (entryStatus == B_OK)
entryStatus = roster.Launch(&ref);
if (entryStatus == B_OK || entryStatus == B_ALREADY_RUNNING) {
syslog(LOG_ERR, "Failed to launch the input server by signature: %s!\n",
strerror(status));
return;
}
syslog(LOG_ERR, "Failed to launch the input server: %s!\n",
strerror(entryStatus));
}