aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs15
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs28
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs4
7 files changed, 45 insertions, 18 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index cc65981..d1a1583 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -104,9 +104,9 @@ namespace OpenSim.Region.ClientStack.Linden
104 104
105 if (m_workerThreads == null) 105 if (m_workerThreads == null)
106 { 106 {
107 m_workerThreads = new Thread[4]; 107 m_workerThreads = new Thread[2];
108 108
109 for (uint i = 0; i < 4; i++) 109 for (uint i = 0; i < 2; i++)
110 { 110 {
111 m_workerThreads[i] = Watchdog.StartThread(DoTextureRequests, 111 m_workerThreads[i] = Watchdog.StartThread(DoTextureRequests,
112 String.Format("TextureWorkerThread{0}", i), 112 String.Format("TextureWorkerThread{0}", i),
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
index 0c067d7..edd9707 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -164,8 +164,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
164 // try child avatar second 164 // try child avatar second
165 foreach (Scene scene in m_Scenes) 165 foreach (Scene scene in m_Scenes)
166 { 166 {
167 m_log.DebugFormat( 167 //m_log.DebugFormat(
168 "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName); 168 // "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName);
169 169
170 ScenePresence sp = scene.GetScenePresence(toAgentID); 170 ScenePresence sp = scene.GetScenePresence(toAgentID);
171 if (sp != null) 171 if (sp != null)
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 30bf744..deb57ce 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2506,6 +2506,12 @@ namespace OpenSim.Region.Framework.Scenes
2506 } 2506 }
2507 2507
2508 m_sceneGraph.LinkObjects(root, children); 2508 m_sceneGraph.LinkObjects(root, children);
2509
2510 ScenePresence sp;
2511 if (TryGetScenePresence(agentId, out sp))
2512 {
2513 root.SendPropertiesToClient(sp.ControllingClient);
2514 }
2509 } 2515 }
2510 2516
2511 private string PermissionString(uint permissions) 2517 private string PermissionString(uint permissions)
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index c4b7b27..1beb584 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1846,6 +1846,7 @@ namespace OpenSim.Region.Framework.Scenes
1846 SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup; 1846 SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup;
1847 } 1847 }
1848 1848
1849 parentGroup.AdjustChildPrimPermissions();
1849 parentGroup.HasGroupChanged = true; 1850 parentGroup.HasGroupChanged = true;
1850 parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true); 1851 parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true);
1851 parentGroup.ScheduleGroupForFullUpdate(); 1852 parentGroup.ScheduleGroupForFullUpdate();
@@ -1986,6 +1987,7 @@ namespace OpenSim.Region.Framework.Scenes
1986 // return unless the root is deleted. This will remove them 1987 // return unless the root is deleted. This will remove them
1987 // from the database. They will be rewritten immediately, 1988 // from the database. They will be rewritten immediately,
1988 // minus the rows for the unlinked child prims. 1989 // minus the rows for the unlinked child prims.
1990 g.AdjustChildPrimPermissions();
1989 m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID); 1991 m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID);
1990 g.TriggerScriptChangedEvent(Changed.LINK); 1992 g.TriggerScriptChangedEvent(Changed.LINK);
1991 g.HasGroupChanged = true; // Persist 1993 g.HasGroupChanged = true; // Persist
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index bf898bb..985f0a0 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -3429,11 +3429,18 @@ namespace OpenSim.Region.Framework.Scenes
3429 3429
3430 public void AdjustChildPrimPermissions() 3430 public void AdjustChildPrimPermissions()
3431 { 3431 {
3432 uint newOwnerMask = (uint)PermissionMask.All & 0xfffffff8; // Mask folded bits
3433 uint foldedPerms = RootPart.OwnerMask & 3;
3434
3432 ForEachPart(part => 3435 ForEachPart(part =>
3433 { 3436 {
3437 newOwnerMask &= part.BaseMask;
3434 if (part != RootPart) 3438 if (part != RootPart)
3435 part.ClonePermissions(RootPart); 3439 part.ClonePermissions(RootPart);
3436 }); 3440 });
3441
3442 RootPart.OwnerMask = newOwnerMask | foldedPerms;
3443 RootPart.ScheduleFullUpdate();
3437 } 3444 }
3438 3445
3439 public void UpdatePermissions(UUID AgentID, byte field, uint localID, 3446 public void UpdatePermissions(UUID AgentID, byte field, uint localID,
@@ -3441,8 +3448,16 @@ namespace OpenSim.Region.Framework.Scenes
3441 { 3448 {
3442 RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF); 3449 RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
3443 3450
3451 bool god = Scene.Permissions.IsGod(AgentID);
3452
3444 AdjustChildPrimPermissions(); 3453 AdjustChildPrimPermissions();
3445 3454
3455 if (field == 1 && god) // Base mask was set. Update all child part inventories
3456 {
3457 foreach (SceneObjectPart part in Parts)
3458 part.Inventory.ApplyGodPermissions(RootPart.BaseMask);
3459 }
3460
3446 HasGroupChanged = true; 3461 HasGroupChanged = true;
3447 3462
3448 // Send the group's properties to all clients once all parts are updated 3463 // Send the group's properties to all clients once all parts are updated
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index d5d8f26..2d90a22 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4480,7 +4480,7 @@ namespace OpenSim.Region.Framework.Scenes
4480 if (god) 4480 if (god)
4481 { 4481 {
4482 BaseMask = ApplyMask(BaseMask, set, mask); 4482 BaseMask = ApplyMask(BaseMask, set, mask);
4483 Inventory.ApplyGodPermissions(_baseMask); 4483 Inventory.ApplyGodPermissions(BaseMask);
4484 } 4484 }
4485 4485
4486 break; 4486 break;
@@ -4499,7 +4499,7 @@ namespace OpenSim.Region.Framework.Scenes
4499 case 16: 4499 case 16:
4500 NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) & 4500 NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) &
4501 baseMask; 4501 baseMask;
4502 // Prevent the client from creating no mod, no copy 4502 // Prevent the client from creating no copy, no transfer
4503 // objects 4503 // objects
4504 if ((NextOwnerMask & (uint)PermissionMask.Copy) == 0) 4504 if ((NextOwnerMask & (uint)PermissionMask.Copy) == 0)
4505 NextOwnerMask |= (uint)PermissionMask.Transfer; 4505 NextOwnerMask |= (uint)PermissionMask.Transfer;
@@ -4517,20 +4517,20 @@ namespace OpenSim.Region.Framework.Scenes
4517 { 4517 {
4518 bool update = false; 4518 bool update = false;
4519 4519
4520 if (BaseMask != source.BaseMask || 4520 uint prevOwnerMask = OwnerMask;
4521 OwnerMask != source.OwnerMask || 4521 uint prevGroupMask = GroupMask;
4522 GroupMask != source.GroupMask || 4522 uint prevEveryoneMask = EveryoneMask;
4523 EveryoneMask != source.EveryoneMask || 4523 uint prevNextOwnerMask = NextOwnerMask;
4524 NextOwnerMask != source.NextOwnerMask)
4525 update = true;
4526 4524
4527 BaseMask = source.BaseMask; 4525 OwnerMask = source.OwnerMask & BaseMask;
4528 OwnerMask = source.OwnerMask; 4526 GroupMask = source.GroupMask & BaseMask;
4529 GroupMask = source.GroupMask; 4527 EveryoneMask = source.EveryoneMask & BaseMask;
4530 EveryoneMask = source.EveryoneMask; 4528 NextOwnerMask = source.NextOwnerMask & BaseMask;
4531 NextOwnerMask = source.NextOwnerMask;
4532 4529
4533 if (update) 4530 if (OwnerMask != prevOwnerMask ||
4531 GroupMask != prevGroupMask ||
4532 EveryoneMask != prevEveryoneMask ||
4533 NextOwnerMask != prevNextOwnerMask)
4534 SendFullUpdateToAllClients(); 4534 SendFullUpdateToAllClients();
4535 } 4535 }
4536 4536
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 7cf193d..17e3de1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3762,6 +3762,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3762 if (World.GetExtraSetting("auto_grant_attach_perms") == "true") 3762 if (World.GetExtraSetting("auto_grant_attach_perms") == "true")
3763 implicitPerms = ScriptBaseClass.PERMISSION_ATTACH; 3763 implicitPerms = ScriptBaseClass.PERMISSION_ATTACH;
3764 } 3764 }
3765 if (World.GetExtraSetting("auto_grant_all_perms") == "true")
3766 {
3767 implicitPerms = perm;
3768 }
3765 } 3769 }
3766 3770
3767 if ((perm & (~implicitPerms)) == 0) // Requested only implicit perms 3771 if ((perm & (~implicitPerms)) == 0) // Requested only implicit perms