aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2014-09-21 22:43:17 +0100
committerUbitUmarov2014-09-21 22:43:17 +0100
commit51ec2d83ac6a609ce6757af2b04fcd1e9cfd769d (patch)
tree054d06a595aa5ce4790663dfcab144dfb7060708 /OpenSim
parentA stab at brute force fixing the locking - one, make m_itemLock volatile, two, (diff)
downloadopensim-SC_OLD-51ec2d83ac6a609ce6757af2b04fcd1e9cfd769d.zip
opensim-SC_OLD-51ec2d83ac6a609ce6757af2b04fcd1e9cfd769d.tar.gz
opensim-SC_OLD-51ec2d83ac6a609ce6757af2b04fcd1e9cfd769d.tar.bz2
opensim-SC_OLD-51ec2d83ac6a609ce6757af2b04fcd1e9cfd769d.tar.xz
remove redundant code
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs27
1 files changed, 7 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 7328a39..147d530 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -505,35 +505,22 @@ namespace OpenSim.Region.Framework.Scenes
505 private void CreateScriptInstanceInternal(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource) 505 private void CreateScriptInstanceInternal(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource)
506 { 506 {
507 m_items.LockItemsForRead(true); 507 m_items.LockItemsForRead(true);
508
508 if (m_items.ContainsKey(itemId)) 509 if (m_items.ContainsKey(itemId))
509 { 510 {
510 if (m_items.ContainsKey(itemId)) 511 m_items.LockItemsForRead(false);
511 { 512 CreateScriptInstance(m_items[itemId], startParam, postOnRez, engine, stateSource);
512 m_items.LockItemsForRead(false);
513 CreateScriptInstance(m_items[itemId], startParam, postOnRez, engine, stateSource);
514 }
515 else
516 {
517 m_items.LockItemsForRead(false);
518 string msg = String.Format("couldn't be found for prim {0}, {1} at {2} in {3}", m_part.Name, m_part.UUID,
519 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
520 StoreScriptError(itemId, msg);
521 m_log.ErrorFormat(
522 "[PRIM INVENTORY]: " +
523 "Couldn't start script with ID {0} since it {1}", itemId, msg);
524 }
525 } 513 }
526 else 514 else
527 { 515 {
528 m_items.LockItemsForRead(false); 516 m_items.LockItemsForRead(false);
529 string msg = String.Format("couldn't be found for prim {0}, {1}", m_part.Name, m_part.UUID); 517 string msg = String.Format("couldn't be found for prim {0}, {1} at {2} in {3}", m_part.Name, m_part.UUID,
518 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
530 StoreScriptError(itemId, msg); 519 StoreScriptError(itemId, msg);
531 m_log.ErrorFormat( 520 m_log.ErrorFormat(
532 "[PRIM INVENTORY]: Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", 521 "[PRIM INVENTORY]: " +
533 itemId, m_part.Name, m_part.UUID, 522 "Couldn't start script with ID {0} since it {1}", itemId, msg);
534 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
535 } 523 }
536
537 } 524 }
538 525
539 /// <summary> 526 /// <summary>