aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
diff options
context:
space:
mode:
authorMelanie2010-07-17 03:09:27 +0100
committerMelanie2010-07-17 03:09:27 +0100
commit6f591376dd22c05d297dec6e5fe0d78e47a7d0ff (patch)
tree52ba1d530eef192274471b212afe1fdec7715cb8 /OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
parentMerge branch '0.6.9-post-fixes' into careminster (diff)
parentStop occasional permanently high 100% utilization when the server is started ... (diff)
downloadopensim-SC-6f591376dd22c05d297dec6e5fe0d78e47a7d0ff.zip
opensim-SC-6f591376dd22c05d297dec6e5fe0d78e47a7d0ff.tar.gz
opensim-SC-6f591376dd22c05d297dec6e5fe0d78e47a7d0ff.tar.bz2
opensim-SC-6f591376dd22c05d297dec6e5fe0d78e47a7d0ff.tar.xz
Merge branch '0.6.9-post-fixes' into careminster
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index a2fceb7..9b16281 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -31,6 +31,7 @@ using System.IO;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Collections; 32using System.Collections;
33using System.Reflection; 33using System.Reflection;
34using System.Threading;
34using OpenMetaverse; 35using OpenMetaverse;
35using log4net; 36using log4net;
36using OpenSim.Framework; 37using OpenSim.Framework;
@@ -209,6 +210,11 @@ namespace OpenSim.Region.Framework.Scenes
209 if ((int)InventoryType.LSL == item.InvType) 210 if ((int)InventoryType.LSL == item.InvType)
210 { 211 {
211 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); 212 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
213 if ((int)InventoryType.LSL == item.InvType)
214 {
215 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
216 Thread.Sleep(10); // workaround for Mono cpu utilization > 100% bug
217 }
212 } 218 }
213 } 219 }
214 } 220 }
@@ -269,7 +275,7 @@ namespace OpenSim.Region.Framework.Scenes
269 // m_log.InfoFormat( 275 // m_log.InfoFormat(
270 // "[PRIM INVENTORY]: " + 276 // "[PRIM INVENTORY]: " +
271 // "Starting script {0}, {1} in prim {2}, {3}", 277 // "Starting script {0}, {1} in prim {2}, {3}",
272 // item.Name, item.ItemID, Name, UUID); 278 // item.Name, item.ItemID, m_part.Name, m_part.UUID);
273 279
274 if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) 280 if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID))
275 { 281 {
@@ -654,6 +660,7 @@ namespace OpenSim.Region.Framework.Scenes
654 item.ParentID = m_part.UUID; 660 item.ParentID = m_part.UUID;
655 item.ParentPartID = m_part.UUID; 661 item.ParentPartID = m_part.UUID;
656 item.Name = name; 662 item.Name = name;
663 item.GroupID = m_part.GroupID;
657 664
658 m_items.LockItemsForWrite(true); 665 m_items.LockItemsForWrite(true);
659 m_items.Add(item.ItemID, item); 666 m_items.Add(item.ItemID, item);
@@ -743,6 +750,11 @@ namespace OpenSim.Region.Framework.Scenes
743 item.ParentID = m_part.UUID; 750 item.ParentID = m_part.UUID;
744 item.ParentPartID = m_part.UUID; 751 item.ParentPartID = m_part.UUID;
745 item.Flags = m_items[item.ItemID].Flags; 752 item.Flags = m_items[item.ItemID].Flags;
753 // If group permissions have been set on, check that the groupID is up to date in case it has
754 // changed since permissions were last set.
755 if (item.GroupPermissions != (uint)PermissionMask.None)
756 item.GroupID = m_part.GroupID;
757
746 if (item.AssetID == UUID.Zero) 758 if (item.AssetID == UUID.Zero)
747 { 759 {
748 item.AssetID = m_items[item.ItemID].AssetID; 760 item.AssetID = m_items[item.ItemID].AssetID;
@@ -896,6 +908,7 @@ namespace OpenSim.Region.Framework.Scenes
896 uint everyoneMask = 0; 908 uint everyoneMask = 0;
897 uint baseMask = item.BasePermissions; 909 uint baseMask = item.BasePermissions;
898 uint ownerMask = item.CurrentPermissions; 910 uint ownerMask = item.CurrentPermissions;
911 uint groupMask = item.GroupPermissions;
899 912
900 invString.AddItemStart(); 913 invString.AddItemStart();
901 invString.AddNameValueLine("item_id", item.ItemID.ToString()); 914 invString.AddNameValueLine("item_id", item.ItemID.ToString());
@@ -905,7 +918,7 @@ namespace OpenSim.Region.Framework.Scenes
905 918
906 invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask)); 919 invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask));
907 invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask)); 920 invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask));
908 invString.AddNameValueLine("group_mask", Utils.UIntToHexString(0)); 921 invString.AddNameValueLine("group_mask", Utils.UIntToHexString(groupMask));
909 invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask)); 922 invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask));
910 invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); 923 invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions));
911 924