cleanup
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2220 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -160,7 +160,7 @@ DormantNodeManager::PutAddon(media_addon_id id)
|
|||||||
UnloadAddon(addon, image);
|
UnloadAddon(addon, image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For use by media_addon_server only
|
||||||
media_addon_id
|
media_addon_id
|
||||||
DormantNodeManager::RegisterAddon(const char *path)
|
DormantNodeManager::RegisterAddon(const char *path)
|
||||||
{
|
{
|
||||||
@@ -203,7 +203,7 @@ DormantNodeManager::RegisterAddon(const char *path)
|
|||||||
return reply.addonid;
|
return reply.addonid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For use by media_addon_server only
|
||||||
void
|
void
|
||||||
DormantNodeManager::UnregisterAddon(media_addon_id id)
|
DormantNodeManager::UnregisterAddon(media_addon_id id)
|
||||||
{
|
{
|
||||||
@@ -284,7 +284,7 @@ DormantNodeManager::LoadAddon(BMediaAddOn **newaddon, image_id *newimage, const
|
|||||||
*newaddon = addon;
|
*newaddon = addon;
|
||||||
*newimage = image;
|
*newimage = image;
|
||||||
|
|
||||||
// we are a friend class of BMediaAddOn and initilize these member variables
|
// we are a friend class of BMediaAddOn and initialize these member variables
|
||||||
addon->fAddon = id;
|
addon->fAddon = id;
|
||||||
addon->fImage = image;
|
addon->fImage = image;
|
||||||
|
|
||||||
|
|||||||
@@ -1524,7 +1524,7 @@ BMediaRoster::InstantiateDormantNode(const dormant_node_info & in_info,
|
|||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
if ((flags & (B_FLAVOR_IS_GLOBAL | B_FLAVOR_IS_LOCAL)) == 0) {
|
if ((flags & (B_FLAVOR_IS_GLOBAL | B_FLAVOR_IS_LOCAL)) == 0) {
|
||||||
printf("Error: BMediaRoster::InstantiateDormantNode called without flags\n");
|
FATAL("Error: BMediaRoster::InstantiateDormantNode called without valid flags\n");
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
}
|
}
|
||||||
if (out_node == 0)
|
if (out_node == 0)
|
||||||
@@ -1559,7 +1559,7 @@ BMediaRoster::InstantiateDormantNode(const dormant_node_info & in_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// XXX SOMETHING IS VERY WRONG HERE
|
// XXX SOMETHING IS VERY WRONG HERE
|
||||||
printf("Error: BMediaRoster::InstantiateDormantNode addon_id %d, flavor_id %d, flags %#08lx\n", (int)in_info.addon, (int)in_info.flavor_id, flags);
|
FATAL("Error: BMediaRoster::InstantiateDormantNode addon_id %d, flavor_id %d, flags %#08lx\n", (int)in_info.addon, (int)in_info.flavor_id, flags);
|
||||||
|
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
@@ -1590,7 +1590,7 @@ BMediaRoster::InstantiateDormantNode(const dormant_node_info & in_info,
|
|||||||
status_t rv;
|
status_t rv;
|
||||||
addon = _DormantNodeManager->GetAddon(in_info.addon);
|
addon = _DormantNodeManager->GetAddon(in_info.addon);
|
||||||
if (!addon) {
|
if (!addon) {
|
||||||
printf("BMediaRoster::InstantiateDormantNode: GetAddon failed\n");
|
FATAL("BMediaRoster::InstantiateDormantNode: GetAddon failed\n");
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
flavor_info temp; // XXX fix this!
|
flavor_info temp; // XXX fix this!
|
||||||
@@ -1599,13 +1599,13 @@ BMediaRoster::InstantiateDormantNode(const dormant_node_info & in_info,
|
|||||||
temp.internal_id = in_info.flavor_id;
|
temp.internal_id = in_info.flavor_id;
|
||||||
node = addon->InstantiateNodeFor(&temp, &config, &out_error);
|
node = addon->InstantiateNodeFor(&temp, &config, &out_error);
|
||||||
if (!node) {
|
if (!node) {
|
||||||
printf("BMediaRoster::InstantiateDormantNode: InstantiateNodeFor failed\n");
|
FATAL("BMediaRoster::InstantiateDormantNode: InstantiateNodeFor failed\n");
|
||||||
_DormantNodeManager->PutAddon(in_info.addon);
|
_DormantNodeManager->PutAddon(in_info.addon);
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
rv = RegisterNode(node);
|
rv = RegisterNode(node);
|
||||||
if (rv != B_OK) {
|
if (rv != B_OK) {
|
||||||
printf("BMediaRoster::InstantiateDormantNode: RegisterNode failed\n");
|
FATAL("BMediaRoster::InstantiateDormantNode: RegisterNode failed\n");
|
||||||
delete node;
|
delete node;
|
||||||
_DormantNodeManager->PutAddon(in_info.addon);
|
_DormantNodeManager->PutAddon(in_info.addon);
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|||||||
Reference in New Issue
Block a user