* Removed some no longer used testing code.

* Fixed unloading the add-on image twice in error case of failing to
  add the add-on info to the list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28307 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-10-24 09:20:00 +00:00
parent bc3955fea5
commit 2d265d2a5b

View File

@ -156,7 +156,6 @@ AddOnManager::_RegisterAddOns()
fHandler = new MonitorHandler(this);
fAddOnMonitor = new AddOnMonitor(fHandler);
#ifndef APPSERVER_TEST_MODE
err = fAddOnMonitor->InitCheck();
if (err != B_OK) {
ERROR("AddOnManager::RegisterAddOns(): fAddOnMonitor->InitCheck() "
@ -190,10 +189,6 @@ AddOnManager::_RegisterAddOns()
}
}
}
#else // APPSERVER_TEST_MODE
BEntry entry("/boot/home/svnhaiku/trunk/tests/servers/input/view_input_device/input_server/devices/ViewInputDevice");
_RegisterAddOn(entry);
#endif
}
@ -388,7 +383,6 @@ AddOnManager::_RegisterDevice(BInputServerDevice* device, const entry_ref& ref,
}
info->ref = ref;
info->image = addOnImage;
info->add_on = device;
if (!fDeviceList.AddItem(info)) {
@ -396,6 +390,8 @@ AddOnManager::_RegisterDevice(BInputServerDevice* device, const entry_ref& ref,
return B_NO_MEMORY;
}
info->image = addOnImage;
return B_OK;
}
@ -425,7 +421,6 @@ AddOnManager::_RegisterFilter(BInputServerFilter* filter, const entry_ref& ref,
}
info->ref = ref;
info->image = addOnImage;
info->add_on = filter;
if (!fFilterList.AddItem(info)) {
@ -439,6 +434,9 @@ AddOnManager::_RegisterFilter(BInputServerFilter* filter, const entry_ref& ref,
delete info;
return B_NO_MEMORY;
}
info->image = addOnImage;
return B_OK;
}
@ -468,7 +466,6 @@ AddOnManager::_RegisterMethod(BInputServerMethod* method, const entry_ref& ref,
}
info->ref = ref;
info->image = addOnImage;
info->add_on = method;
if (!fMethodList.AddItem(info)) {
@ -483,6 +480,8 @@ AddOnManager::_RegisterMethod(BInputServerMethod* method, const entry_ref& ref,
return B_NO_MEMORY;
}
info->image = addOnImage;
if (gInputServer->MethodReplicant() == NULL) {
_LoadReplicant();