registrar: Fixed app_server detection.
* This also fixes the shutdown process, as the registrar no longer kills the app_server. * Removed SERVER_PORT_NAME definition as it has no use anymore.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2012, Haiku.
|
* Copyright 2001-2015, Haiku.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -15,15 +15,6 @@
|
|||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
|
|
||||||
|
|
||||||
// Server port names. The input port is the port which is used to receive
|
|
||||||
// input messages from the Input Server. The other is the "main" port for
|
|
||||||
// the server and is utilized mostly by BApplication objects.
|
|
||||||
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
|
||||||
# define SERVER_PORT_NAME "system:app_server"
|
|
||||||
#else
|
|
||||||
# define SERVER_PORT_NAME "haiku-test:app_server"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if TEST_MODE
|
#if TEST_MODE
|
||||||
# define SERVER_INPUT_PORT "haiku-test:input port"
|
# define SERVER_INPUT_PORT "haiku-test:input port"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1430,23 +1430,19 @@ TRoster::GetShutdownApps(AppInfoList& userApps, AppInfoList& systemApps,
|
|||||||
vitalSystemApps.insert(teamInfo.team);
|
vitalSystemApps.insert(teamInfo.team);
|
||||||
|
|
||||||
// app server
|
// app server
|
||||||
port_id appServerPort = find_port(SERVER_PORT_NAME);
|
RosterAppInfo* info
|
||||||
port_info portInfo;
|
= fRegisteredApps.InfoFor("application/x-vnd.haiku-app_server");
|
||||||
if (appServerPort >= 0
|
if (info != NULL)
|
||||||
&& get_port_info(appServerPort, &portInfo) == B_OK) {
|
vitalSystemApps.insert(info->team);
|
||||||
vitalSystemApps.insert(portInfo.team);
|
|
||||||
}
|
|
||||||
|
|
||||||
// debug server
|
// debug server
|
||||||
RosterAppInfo* info =
|
info = fRegisteredApps.InfoFor("application/x-vnd.haiku-debug_server");
|
||||||
fRegisteredApps.InfoFor("application/x-vnd.haiku-debug_server");
|
if (info != NULL)
|
||||||
if (info)
|
|
||||||
vitalSystemApps.insert(info->team);
|
vitalSystemApps.insert(info->team);
|
||||||
|
|
||||||
// populate the other groups
|
// populate the other groups
|
||||||
for (AppInfoList::Iterator it(fRegisteredApps.It());
|
for (AppInfoList::Iterator it(fRegisteredApps.It());
|
||||||
RosterAppInfo* info = *it;
|
RosterAppInfo* info = *it; ++it) {
|
||||||
++it) {
|
|
||||||
if (vitalSystemApps.find(info->team) == vitalSystemApps.end()) {
|
if (vitalSystemApps.find(info->team) == vitalSystemApps.end()) {
|
||||||
RosterAppInfo* clonedInfo = info->Clone();
|
RosterAppInfo* clonedInfo = info->Clone();
|
||||||
if (clonedInfo) {
|
if (clonedInfo) {
|
||||||
@@ -1474,8 +1470,8 @@ TRoster::GetShutdownApps(AppInfoList& userApps, AppInfoList& systemApps,
|
|||||||
// Special case, we add the input server to vital apps here so it is
|
// Special case, we add the input server to vital apps here so it is
|
||||||
// not excluded in the lists above
|
// not excluded in the lists above
|
||||||
info = fRegisteredApps.InfoFor("application/x-vnd.Be-input_server");
|
info = fRegisteredApps.InfoFor("application/x-vnd.Be-input_server");
|
||||||
if (info)
|
if (info != NULL)
|
||||||
vitalSystemApps.insert(info->team);
|
vitalSystemApps.insert(info->team);
|
||||||
|
|
||||||
// clean up on error
|
// clean up on error
|
||||||
if (error != B_OK) {
|
if (error != B_OK) {
|
||||||
|
|||||||
Reference in New Issue
Block a user