* Temporary resolution for mantis #711

* Trying to store items other than textures, sounds and scripts in a prim's inventory should no longer cause an exception.
* Temporary solution is to ignore storage requests for these assets - actually implementing this requires changes to TaskInventoryItem, at least
0.6.0-stable
Justin Clarke Casey 2008-03-07 12:39:06 +00:00
parent 759a0bcba0
commit 9aeff3fb86
1 changed files with 19 additions and 10 deletions

View File

@ -606,7 +606,6 @@ namespace OpenSim.Region.Environment.Scenes
public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID,
uint primLocalID) uint primLocalID)
{ {
SceneObjectGroup group = GetGroupByPrim(primLocalID); SceneObjectGroup group = GetGroupByPrim(primLocalID);
if (group != null) if (group != null)
@ -629,11 +628,25 @@ namespace OpenSim.Region.Environment.Scenes
if (item != null) if (item != null)
{ {
if (item.assetType == 0 || item.assetType == 1 || item.assetType == 10)
{
group.AddInventoryItem(remoteClient, primLocalID, item, copyID); group.AddInventoryItem(remoteClient, primLocalID, item, copyID);
m_log.InfoFormat("[PRIMINVENTORY]: Update with item {0} requested of prim {1} for {2}", item.inventoryName, primLocalID, remoteClient.Name); m_log.InfoFormat(
"[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}",
item.inventoryName, primLocalID, remoteClient.Name);
group.GetProperties(remoteClient); group.GetProperties(remoteClient);
}
else
{
// XXX Nasty temporary way of stopping things other than sounds, textures and scripts
// from going in a prim's inventory, since other things will not currently work
// See http://opensimulator.org/mantis/view.php?id=711 for the error caused later on
// - to implement requires changes to TaskInventoryItem (which really requires the current
// nasty way it is done to be changed).
m_log.WarnFormat(
"[PRIM INVENTORY]: Sorry, prim inventory storage of asset type {0} is not yet supported",
item.assetType);
}
} }
else else
{ {
@ -641,12 +654,8 @@ namespace OpenSim.Region.Environment.Scenes
"[PRIM INVENTORY]: Could not find inventory item {0} to update for {1}!", "[PRIM INVENTORY]: Could not find inventory item {0} to update for {1}!",
itemID, remoteClient.Name); itemID, remoteClient.Name);
} }
} }
} }
} }
else else
{ {