aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-07-06 12:35:00 +0000
committerJustin Clarke Casey2008-07-06 12:35:00 +0000
commit0b16f9eee2f985e1ad48ab66a48346a7f21f63f6 (patch)
tree6d04a7de22d3eadb927b89f3738efd06974b6d7d /OpenSim
parentMantis#1674. Thank you kindly, Matth for a patch that: (diff)
downloadopensim-SC_OLD-0b16f9eee2f985e1ad48ab66a48346a7f21f63f6.zip
opensim-SC_OLD-0b16f9eee2f985e1ad48ab66a48346a7f21f63f6.tar.gz
opensim-SC_OLD-0b16f9eee2f985e1ad48ab66a48346a7f21f63f6.tar.bz2
opensim-SC_OLD-0b16f9eee2f985e1ad48ab66a48346a7f21f63f6.tar.xz
* minor: Stop spurious 'item not found' messages when placing things into a prim's inventory
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs32
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs11
2 files changed, 28 insertions, 15 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 36ca51b..9b94e05 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -239,8 +239,14 @@ namespace OpenSim.Region.Environment.Scenes
239 239
240 // Retrieve item 240 // Retrieve item
241 TaskInventoryItem item = group.GetInventoryItem(part.LocalId, itemId); 241 TaskInventoryItem item = group.GetInventoryItem(part.LocalId, itemId);
242
242 if (null == item) 243 if (null == item)
243 { 244 {
245 m_log.ErrorFormat(
246 "[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for caps script update "
247 + " but the item does not exist in this inventory",
248 itemId, part.Name, part.UUID);
249
244 return; 250 return;
245 } 251 }
246 252
@@ -878,7 +884,12 @@ namespace OpenSim.Region.Environment.Scenes
878 884
879 if (null == taskItem) 885 if (null == taskItem)
880 { 886 {
881 // Console already notified of error in GetInventoryItem 887 m_log.ErrorFormat(
888 "[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for creating an avatar"
889 + " inventory item from a prim's inventory item "
890 + " but the required item does not exist in the prim's inventory",
891 itemId, part.Name, part.UUID);
892
882 return null; 893 return null;
883 } 894 }
884 895
@@ -1010,7 +1021,11 @@ namespace OpenSim.Region.Environment.Scenes
1010 1021
1011 if (srcTaskItem == null) 1022 if (srcTaskItem == null)
1012 { 1023 {
1013 // error was already logged 1024 m_log.ErrorFormat(
1025 "[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for moving"
1026 + " but the item does not exist in this inventory",
1027 itemId, part.Name, part.UUID);
1028
1014 return; 1029 return;
1015 } 1030 }
1016 1031
@@ -1143,7 +1158,8 @@ namespace OpenSim.Region.Environment.Scenes
1143 1158
1144 if (part != null) 1159 if (part != null)
1145 { 1160 {
1146 TaskInventoryItem currentItem=part.GetInventoryItem(itemID); 1161 TaskInventoryItem currentItem = part.GetInventoryItem(itemID);
1162
1147 if (currentItem == null) 1163 if (currentItem == null)
1148 { 1164 {
1149 LLUUID copyID = LLUUID.Random(); 1165 LLUUID copyID = LLUUID.Random();
@@ -1186,7 +1202,7 @@ namespace OpenSim.Region.Environment.Scenes
1186 } 1202 }
1187 else // Updating existing item with new perms etc 1203 else // Updating existing item with new perms etc
1188 { 1204 {
1189 TaskInventoryItem prevItem=part.GetInventoryItem(itemID); 1205 TaskInventoryItem prevItem = part.GetInventoryItem(itemID);
1190 itemInfo.AssetID = prevItem.AssetID; 1206 itemInfo.AssetID = prevItem.AssetID;
1191 if (part.UpdateInventoryItem(itemInfo)) 1207 if (part.UpdateInventoryItem(itemInfo))
1192 part.GetProperties(remoteClient); 1208 part.GetProperties(remoteClient);
@@ -1314,7 +1330,11 @@ namespace OpenSim.Region.Environment.Scenes
1314 1330
1315 if (srcTaskItem == null) 1331 if (srcTaskItem == null)
1316 { 1332 {
1317 // error was already logged 1333 m_log.ErrorFormat(
1334 "[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for rezzing a script but the "
1335 + " item does not exist in this inventory",
1336 srcId, srcPart.Name, srcPart.UUID);
1337
1318 return; 1338 return;
1319 } 1339 }
1320 1340
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 7622609..7e43b44 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -272,7 +272,7 @@ namespace OpenSim.Region.Environment.Scenes
272 item.ParentID = UUID; 272 item.ParentID = UUID;
273 item.ParentPartID = UUID; 273 item.ParentPartID = UUID;
274 274
275 string name=FindAvailableInventoryName(item.Name); 275 string name = FindAvailableInventoryName(item.Name);
276 if (name == String.Empty) 276 if (name == String.Empty)
277 return; 277 return;
278 278
@@ -346,7 +346,7 @@ namespace OpenSim.Region.Environment.Scenes
346 /// <param name="itemID"></param> 346 /// <param name="itemID"></param>
347 /// <returns>null if the item does not exist</returns> 347 /// <returns>null if the item does not exist</returns>
348 public TaskInventoryItem GetInventoryItem(LLUUID itemID) 348 public TaskInventoryItem GetInventoryItem(LLUUID itemID)
349 { 349 {
350 lock (m_taskInventory) 350 lock (m_taskInventory)
351 { 351 {
352 if (m_taskInventory.ContainsKey(itemID)) 352 if (m_taskInventory.ContainsKey(itemID))
@@ -357,13 +357,6 @@ namespace OpenSim.Region.Environment.Scenes
357 357
358 return m_taskInventory[itemID]; 358 return m_taskInventory[itemID];
359 } 359 }
360 else
361 {
362 m_log.ErrorFormat(
363 "[PRIM INVENTORY]: " +
364 "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory",
365 itemID, Name, UUID);
366 }
367 } 360 }
368 361
369 return null; 362 return null;