* minor: Stop spurious 'item not found' messages when placing things into a prim's inventory

0.6.0-stable
Justin Clarke Casey 2008-07-06 12:35:00 +00:00
parent f6375fceb4
commit 0b16f9eee2
2 changed files with 28 additions and 15 deletions

View File

@ -239,8 +239,14 @@ namespace OpenSim.Region.Environment.Scenes
// Retrieve item
TaskInventoryItem item = group.GetInventoryItem(part.LocalId, itemId);
if (null == item)
{
{
m_log.ErrorFormat(
"[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for caps script update "
+ " but the item does not exist in this inventory",
itemId, part.Name, part.UUID);
return;
}
@ -878,7 +884,12 @@ namespace OpenSim.Region.Environment.Scenes
if (null == taskItem)
{
// Console already notified of error in GetInventoryItem
m_log.ErrorFormat(
"[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for creating an avatar"
+ " inventory item from a prim's inventory item "
+ " but the required item does not exist in the prim's inventory",
itemId, part.Name, part.UUID);
return null;
}
@ -1010,7 +1021,11 @@ namespace OpenSim.Region.Environment.Scenes
if (srcTaskItem == null)
{
// error was already logged
m_log.ErrorFormat(
"[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for moving"
+ " but the item does not exist in this inventory",
itemId, part.Name, part.UUID);
return;
}
@ -1143,7 +1158,8 @@ namespace OpenSim.Region.Environment.Scenes
if (part != null)
{
TaskInventoryItem currentItem=part.GetInventoryItem(itemID);
TaskInventoryItem currentItem = part.GetInventoryItem(itemID);
if (currentItem == null)
{
LLUUID copyID = LLUUID.Random();
@ -1186,7 +1202,7 @@ namespace OpenSim.Region.Environment.Scenes
}
else // Updating existing item with new perms etc
{
TaskInventoryItem prevItem=part.GetInventoryItem(itemID);
TaskInventoryItem prevItem = part.GetInventoryItem(itemID);
itemInfo.AssetID = prevItem.AssetID;
if (part.UpdateInventoryItem(itemInfo))
part.GetProperties(remoteClient);
@ -1314,7 +1330,11 @@ namespace OpenSim.Region.Environment.Scenes
if (srcTaskItem == null)
{
// error was already logged
m_log.ErrorFormat(
"[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for rezzing a script but the "
+ " item does not exist in this inventory",
srcId, srcPart.Name, srcPart.UUID);
return;
}

View File

@ -272,7 +272,7 @@ namespace OpenSim.Region.Environment.Scenes
item.ParentID = UUID;
item.ParentPartID = UUID;
string name=FindAvailableInventoryName(item.Name);
string name = FindAvailableInventoryName(item.Name);
if (name == String.Empty)
return;
@ -346,7 +346,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="itemID"></param>
/// <returns>null if the item does not exist</returns>
public TaskInventoryItem GetInventoryItem(LLUUID itemID)
{
{
lock (m_taskInventory)
{
if (m_taskInventory.ContainsKey(itemID))
@ -357,13 +357,6 @@ namespace OpenSim.Region.Environment.Scenes
return m_taskInventory[itemID];
}
else
{
m_log.ErrorFormat(
"[PRIM INVENTORY]: " +
"Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory",
itemID, Name, UUID);
}
}
return null;