Merge branch 'avination' into careminster

avinationmerge
Melanie 2012-10-17 00:13:49 +01:00
commit 416bc19da7
7 changed files with 45 additions and 18 deletions

View File

@ -104,9 +104,9 @@ namespace OpenSim.Region.ClientStack.Linden
if (m_workerThreads == null)
{
m_workerThreads = new Thread[4];
m_workerThreads = new Thread[2];
for (uint i = 0; i < 4; i++)
for (uint i = 0; i < 2; i++)
{
m_workerThreads[i] = Watchdog.StartThread(DoTextureRequests,
String.Format("TextureWorkerThread{0}", i),

View File

@ -164,8 +164,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
// try child avatar second
foreach (Scene scene in m_Scenes)
{
m_log.DebugFormat(
"[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName);
//m_log.DebugFormat(
// "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName);
ScenePresence sp = scene.GetScenePresence(toAgentID);
if (sp != null)

View File

@ -2506,6 +2506,12 @@ namespace OpenSim.Region.Framework.Scenes
}
m_sceneGraph.LinkObjects(root, children);
ScenePresence sp;
if (TryGetScenePresence(agentId, out sp))
{
root.SendPropertiesToClient(sp.ControllingClient);
}
}
private string PermissionString(uint permissions)

View File

@ -1846,6 +1846,7 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup;
}
parentGroup.AdjustChildPrimPermissions();
parentGroup.HasGroupChanged = true;
parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true);
parentGroup.ScheduleGroupForFullUpdate();
@ -1986,6 +1987,7 @@ namespace OpenSim.Region.Framework.Scenes
// return unless the root is deleted. This will remove them
// from the database. They will be rewritten immediately,
// minus the rows for the unlinked child prims.
g.AdjustChildPrimPermissions();
m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID);
g.TriggerScriptChangedEvent(Changed.LINK);
g.HasGroupChanged = true; // Persist

View File

@ -3429,11 +3429,18 @@ namespace OpenSim.Region.Framework.Scenes
public void AdjustChildPrimPermissions()
{
uint newOwnerMask = (uint)PermissionMask.All & 0xfffffff8; // Mask folded bits
uint foldedPerms = RootPart.OwnerMask & 3;
ForEachPart(part =>
{
newOwnerMask &= part.BaseMask;
if (part != RootPart)
part.ClonePermissions(RootPart);
});
RootPart.OwnerMask = newOwnerMask | foldedPerms;
RootPart.ScheduleFullUpdate();
}
public void UpdatePermissions(UUID AgentID, byte field, uint localID,
@ -3441,8 +3448,16 @@ namespace OpenSim.Region.Framework.Scenes
{
RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
bool god = Scene.Permissions.IsGod(AgentID);
AdjustChildPrimPermissions();
if (field == 1 && god) // Base mask was set. Update all child part inventories
{
foreach (SceneObjectPart part in Parts)
part.Inventory.ApplyGodPermissions(RootPart.BaseMask);
}
HasGroupChanged = true;
// Send the group's properties to all clients once all parts are updated

View File

@ -4480,7 +4480,7 @@ namespace OpenSim.Region.Framework.Scenes
if (god)
{
BaseMask = ApplyMask(BaseMask, set, mask);
Inventory.ApplyGodPermissions(_baseMask);
Inventory.ApplyGodPermissions(BaseMask);
}
break;
@ -4499,7 +4499,7 @@ namespace OpenSim.Region.Framework.Scenes
case 16:
NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) &
baseMask;
// Prevent the client from creating no mod, no copy
// Prevent the client from creating no copy, no transfer
// objects
if ((NextOwnerMask & (uint)PermissionMask.Copy) == 0)
NextOwnerMask |= (uint)PermissionMask.Transfer;
@ -4517,20 +4517,20 @@ namespace OpenSim.Region.Framework.Scenes
{
bool update = false;
if (BaseMask != source.BaseMask ||
OwnerMask != source.OwnerMask ||
GroupMask != source.GroupMask ||
EveryoneMask != source.EveryoneMask ||
NextOwnerMask != source.NextOwnerMask)
update = true;
uint prevOwnerMask = OwnerMask;
uint prevGroupMask = GroupMask;
uint prevEveryoneMask = EveryoneMask;
uint prevNextOwnerMask = NextOwnerMask;
BaseMask = source.BaseMask;
OwnerMask = source.OwnerMask;
GroupMask = source.GroupMask;
EveryoneMask = source.EveryoneMask;
NextOwnerMask = source.NextOwnerMask;
OwnerMask = source.OwnerMask & BaseMask;
GroupMask = source.GroupMask & BaseMask;
EveryoneMask = source.EveryoneMask & BaseMask;
NextOwnerMask = source.NextOwnerMask & BaseMask;
if (update)
if (OwnerMask != prevOwnerMask ||
GroupMask != prevGroupMask ||
EveryoneMask != prevEveryoneMask ||
NextOwnerMask != prevNextOwnerMask)
SendFullUpdateToAllClients();
}

View File

@ -3762,6 +3762,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (World.GetExtraSetting("auto_grant_attach_perms") == "true")
implicitPerms = ScriptBaseClass.PERMISSION_ATTACH;
}
if (World.GetExtraSetting("auto_grant_all_perms") == "true")
{
implicitPerms = perm;
}
}
if ((perm & (~implicitPerms)) == 0) // Requested only implicit perms