From 8022400bd4c852c3faf0db61006a2c60f5200342 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 31 Mar 2011 22:16:09 +0100 Subject: [PATCH 01/12] Remove unused Datastore parameter from RegionInfo (legacy from early 2008) --- OpenSim/Framework/RegionInfo.cs | 11 ----------- OpenSim/Region/Framework/Scenes/Scene.cs | 1 - OpenSim/Region/Framework/Scenes/SceneBase.cs | 2 -- 3 files changed, 14 deletions(-) diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 680e702a11..afedcf5d09 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -347,7 +347,6 @@ namespace OpenSim.Framework public bool commFailTF = false; public ConfigurationMember configMember; - public string DataStore = String.Empty; public string RegionFile = String.Empty; public bool isSandbox = false; public bool Persistent = true; @@ -746,10 +745,6 @@ namespace OpenSim.Framework m_regionLocX = Convert.ToUInt32(locationElements[0]); m_regionLocY = Convert.ToUInt32(locationElements[1]); - - // Datastore (is this implemented? Omitted from example!) - DataStore = config.GetString("Datastore", String.Empty); - // Internal IP IPAddress address; @@ -846,9 +841,6 @@ namespace OpenSim.Framework string location = String.Format("{0},{1}", m_regionLocX, m_regionLocY); config.Set("Location", location); - if (DataStore != String.Empty) - config.Set("Datastore", DataStore); - config.Set("InternalAddress", m_internalEndPoint.Address.ToString()); config.Set("InternalPort", m_internalEndPoint.Port); @@ -1025,9 +1017,6 @@ namespace OpenSim.Framework case "sim_location_y": m_regionLocY = (uint) configuration_result; break; - case "datastore": - DataStore = (string) configuration_result; - break; case "internal_ip_address": IPAddress address = (IPAddress) configuration_result; m_internalEndPoint = new IPEndPoint(address, 0); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d407a6f033..353b7c2e44 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -563,7 +563,6 @@ namespace OpenSim.Region.Framework.Scenes m_regInfo = regInfo; m_regionHandle = m_regInfo.RegionHandle; m_regionName = m_regInfo.RegionName; - m_datastore = m_regInfo.DataStore; m_lastUpdate = Util.EnvironmentTickCount(); m_physicalPrim = physicalPrim; diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index f343bc861e..c4547f2b46 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs @@ -136,8 +136,6 @@ namespace OpenSim.Region.Framework.Scenes get { return m_permissions; } } - protected string m_datastore; - /* Used by the loadbalancer plugin on GForge */ protected RegionStatus m_regStatus; public RegionStatus RegionStatus From 7bba31e8d943f03e2ea54317703e1bd9e243b70b Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 31 Mar 2011 22:20:12 +0100 Subject: [PATCH 02/12] remove some mono compiler warnings --- OpenSim/Data/MSSQL/MSSQLAvatarData.cs | 2 +- OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs | 4 ++-- OpenSim/Data/MSSQL/MSSQLGridUserData.cs | 2 +- OpenSim/Data/MSSQL/MSSQLManager.cs | 4 +--- OpenSim/Data/MSSQL/MSSQLPresenceData.cs | 2 +- OpenSim/Data/MSSQL/MSSQLXInventoryData.cs | 4 ++-- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/OpenSim/Data/MSSQL/MSSQLAvatarData.cs b/OpenSim/Data/MSSQL/MSSQLAvatarData.cs index 49a6b09f76..301b42490a 100644 --- a/OpenSim/Data/MSSQL/MSSQLAvatarData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAvatarData.cs @@ -43,7 +43,7 @@ namespace OpenSim.Data.MSSQL public class MSSQLAvatarData : MSSQLGenericTableHandler, IAvatarData { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public MSSQLAvatarData(string connectionString, string realm) : base(connectionString, realm, "Avatar") diff --git a/OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs b/OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs index 904366e995..6a5d6eb58a 100644 --- a/OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs +++ b/OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs @@ -40,8 +40,8 @@ namespace OpenSim.Data.MSSQL { public class MSSQLGenericTableHandler where T : class, new() { - private static readonly ILog m_log = - LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected string m_ConnectionString; protected MSSQLManager m_database; //used for parameter type translation diff --git a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs index 1870273616..9e215f9fb2 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs @@ -43,7 +43,7 @@ namespace OpenSim.Data.MSSQL public class MSSQLGridUserData : MSSQLGenericTableHandler, IGridUserData { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public MSSQLGridUserData(string connectionString, string realm) : base(connectionString, realm, "GridUserStore") diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs index 575fd210c1..cf963e3f07 100644 --- a/OpenSim/Data/MSSQL/MSSQLManager.cs +++ b/OpenSim/Data/MSSQL/MSSQLManager.cs @@ -41,7 +41,7 @@ namespace OpenSim.Data.MSSQL /// public class MSSQLManager { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// /// Connection string for ADO.net @@ -180,8 +180,6 @@ namespace OpenSim.Data.MSSQL return parameter; } - private static readonly Dictionary emptyDictionary = new Dictionary(); - /// /// Checks if we need to do some migrations to the database /// diff --git a/OpenSim/Data/MSSQL/MSSQLPresenceData.cs b/OpenSim/Data/MSSQL/MSSQLPresenceData.cs index e7b3d9c367..8068d23bb1 100644 --- a/OpenSim/Data/MSSQL/MSSQLPresenceData.cs +++ b/OpenSim/Data/MSSQL/MSSQLPresenceData.cs @@ -43,7 +43,7 @@ namespace OpenSim.Data.MSSQL public class MSSQLPresenceData : MSSQLGenericTableHandler, IPresenceData { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public MSSQLPresenceData(string connectionString, string realm) : base(connectionString, realm, "Presence") diff --git a/OpenSim/Data/MSSQL/MSSQLXInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLXInventoryData.cs index 739eb55ad4..5bc4fe41e5 100644 --- a/OpenSim/Data/MSSQL/MSSQLXInventoryData.cs +++ b/OpenSim/Data/MSSQL/MSSQLXInventoryData.cs @@ -40,8 +40,8 @@ namespace OpenSim.Data.MSSQL { public class MSSQLXInventoryData : IXInventoryData { - private static readonly ILog m_log = LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger( +// MethodBase.GetCurrentMethod().DeclaringType); private MSSQLGenericTableHandler m_Folders; private MSSQLItemHandler m_Items; From efd0c003a3baf3c8d1abd1bab422ae5bb015ab87 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 31 Mar 2011 22:47:18 +0100 Subject: [PATCH 03/12] Put in temporary logging message to find out if scene objects are requesting land objects for co-ordinates outside the region --- .../CoreModules/World/Land/LandManagementModule.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 52e3718bc7..fac25741c6 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -762,13 +762,14 @@ namespace OpenSim.Region.CoreModules.World.Land { try { - //if (m_landList.ContainsKey(m_landIDList[x / 4, y / 4])) - return m_landList[m_landIDList[x / 4, y / 4]]; - //else - // return null; + return m_landList[m_landIDList[x / 4, y / 4]]; } catch (IndexOutOfRangeException) { + m_log.WarnFormat( + "[LAND MANAGEMENT MODULE]: Tried to retrieve land object from out of bounds co-ordinate ({0},{1}) in {2}", + x, y, m_scene.RegionInfo.RegionName); + return null; } } From 88bd38690a56f5e381f8038b971950c9f5842c51 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 31 Mar 2011 23:03:42 +0100 Subject: [PATCH 04/12] Remove unused RegionInfo.getInternalEndPointPort() in favour of RegionInfo.InternalEndPoint.Port --- OpenSim/Framework/RegionInfo.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index afedcf5d09..daf0a256d6 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -1164,11 +1164,6 @@ namespace OpenSim.Framework return regionInfo; } - public int getInternalEndPointPort() - { - return m_internalEndPoint.Port; - } - public Dictionary ToKeyValuePairs() { Dictionary kvp = new Dictionary(); @@ -1187,4 +1182,4 @@ namespace OpenSim.Framework return kvp; } } -} +} \ No newline at end of file From 6ae76ede98c3fa7731daf7149a8831f474770fee Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 31 Mar 2011 23:09:06 +0100 Subject: [PATCH 05/12] suspend check that IAR control file is loaded for now I was mistaken - some previous opensim versions don't save this file first. Will have to bump iar version number and only check iars after the bump --- .../Inventory/Archiver/InventoryArchiveReadRequest.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 9b98de3b67..01170aaf65 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs @@ -77,7 +77,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// private Stream m_loadStream; - protected bool m_controlFileLoaded; + /// + /// FIXME: Do not perform this check since older versions of OpenSim do save the control file after other things + /// (I thought they weren't). We will need to bump the version number and perform this check on all + /// subsequent IAR versions only + /// + protected bool m_controlFileLoaded = true; protected bool m_assetsLoaded; protected bool m_inventoryNodesLoaded; From 4d0cffa06e1c4071d137834e1d5c2cd06c933441 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 31 Mar 2011 23:56:26 +0100 Subject: [PATCH 06/12] If the prim count gets an object with invalid bounds, don't try to count it. This appears to be the more probable explanation for some failures seen. Either we're counting attachments which are temporarily out of bounds (shouldn't be due to the IsAttachment) check or we're counting scene objects which have out of bounds co-ordinates (seems more likely) --- .../Region/CoreModules/World/Land/LandManagementModule.cs | 6 +++--- OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index fac25741c6..2b5f7a037a 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -766,9 +766,9 @@ namespace OpenSim.Region.CoreModules.World.Land } catch (IndexOutOfRangeException) { - m_log.WarnFormat( - "[LAND MANAGEMENT MODULE]: Tried to retrieve land object from out of bounds co-ordinate ({0},{1}) in {2}", - x, y, m_scene.RegionInfo.RegionName); +// m_log.WarnFormat( +// "[LAND MANAGEMENT MODULE]: Tried to retrieve land object from out of bounds co-ordinate ({0},{1}) in {2}", +// x, y, m_scene.RegionInfo.RegionName); return null; } diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs index d1e2328728..f07ae31e1c 100644 --- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs @@ -183,6 +183,11 @@ namespace OpenSim.Region.CoreModules.World.Land Vector3 pos = obj.AbsolutePosition; ILandObject landObject = m_Scene.LandChannel.GetLandObject(pos.X, pos.Y); + + // If for some reason there is no land object (perhaps the object is out of bounds) then we can't count it + if (landObject == null) + return; + LandData landData = landObject.LandData; // m_log.DebugFormat( From 39c610c16554de05dae975cb9258881dce1d17ed Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 1 Apr 2011 00:41:52 +0100 Subject: [PATCH 07/12] Log which address and port the UDP listener is configured for. This will match that given for InternalAddress in the config (e.g. 0.0.0.0) Can't obtain actually bound address until the UDP socket is used for the first time. --- OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs index d2779ba302..6eebd9df3a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs @@ -100,6 +100,10 @@ namespace OpenMetaverse const int SIO_UDP_CONNRESET = -1744830452; IPEndPoint ipep = new IPEndPoint(m_localBindAddress, m_udpPort); + + m_log.DebugFormat( + "[UDPBASE]: Binding UDP listener using internal IP address config {0}:{1}", + ipep.Address, ipep.Port); m_udpSocket = new Socket( AddressFamily.InterNetwork, From e1ceb461c0e37cfe56fdfeb91a9ac4b4aa54b931 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 1 Apr 2011 00:51:10 +0100 Subject: [PATCH 08/12] Make default answer for 'do you wish to join region to an existing estate' yes instead of no. --- OpenSim/Region/Application/OpenSimBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 640581181c..f98d70283a 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -860,7 +860,7 @@ namespace OpenSim = MainConsole.Instance.CmdPrompt( string.Format( "Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName), - "no", + "yes", new List() { "yes", "no" }); if (response == "no") From 8f4bf435344af76d7ff6436ec74eab92399c3a99 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 1 Apr 2011 00:55:05 +0100 Subject: [PATCH 09/12] When asked to join region to existing estate, make first estate name the default instead of None --- OpenSim/Region/Application/OpenSimBase.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f98d70283a..ea9edf686b 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -876,15 +876,12 @@ namespace OpenSim = MainConsole.Instance.CmdPrompt( string.Format( "Name of estate to join. Existing estate names are ({0})", string.Join(", ", estateNames.ToArray())), - "None"); - - if (response == "None") - continue; + estateNames[0]); List estateIDs = EstateDataService.GetEstates(response); if (estateIDs.Count < 1) { - MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again."); + MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again."); continue; } From 8c8a0a182e28f3486ce89fc0570b56fe53f69934 Mon Sep 17 00:00:00 2001 From: dahlia Date: Thu, 31 Mar 2011 21:14:53 -0700 Subject: [PATCH 10/12] implement LSL "print()" API function --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 +++++++- .../Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | 1 + .../Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 72ee495906..e3e16bd4e2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -81,7 +81,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi { - //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected IScriptEngine m_ScriptEngine; protected SceneObjectPart m_host; protected uint m_localID; @@ -10278,6 +10278,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return GetLinkPrimitiveParams(obj, rules); } + + public void print(string str) + { + // yes, this is a real LSL function. See: http://wiki.secondlife.com/wiki/Print + m_log.Info("LSL print():" + str); + } } public class NotecardCache diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 561e3b3213..bd6a094aa7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs @@ -398,6 +398,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Vector llWind(LSL_Vector offset); LSL_String llXorBase64Strings(string str1, string str2); LSL_String llXorBase64StringsCorrect(string str1, string str2); + void print(string str); void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules); LSL_List GetLinkPrimitiveParamsEx(LSL_Key prim, LSL_List rules); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 451163fe99..3b298615d0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs @@ -1847,5 +1847,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { return m_LSL_Functions.llClearPrimMedia(face); } + + public void print(string str) + { + m_LSL_Functions.print(str); + } } } From e974fde95313e17c239e4e35487da897f725a904 Mon Sep 17 00:00:00 2001 From: dahlia Date: Thu, 31 Mar 2011 22:56:04 -0700 Subject: [PATCH 11/12] check threat configuration for LSL print() --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e3e16bd4e2..43b0da320e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -10282,7 +10282,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void print(string str) { // yes, this is a real LSL function. See: http://wiki.secondlife.com/wiki/Print - m_log.Info("LSL print():" + str); + IOSSL_Api ossl = (IOSSL_Api)m_ScriptEngine.GetApi(m_itemID, "OSSL"); + if (ossl != null) + { + ossl.CheckThreatLevel(ThreatLevel.High, "print"); + m_log.Info("LSL print():" + str); + } } } From 3a113f9902b859d11c200f9b0db06c2317eb53cc Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 1 Apr 2011 22:04:29 +0100 Subject: [PATCH 12/12] A stab at making CHANGED_OWNER work --- .../InventoryAccess/InventoryAccessModule.cs | 24 ++++++------------- .../Scenes/SceneObjectPartInventory.cs | 10 ++++---- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 798547a82d..8d0c35a746 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -668,28 +668,18 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) part.GroupMask = item.GroupPermissions; } + + foreach (SceneObjectPart part in group.Parts) + { + part.LastOwnerID = part.OwnerID; + part.OwnerID = item.Owner; + part.Inventory.ChangeInventoryOwner(item.Owner); + } group.ApplyNextOwnerPermissions(); } } - foreach (SceneObjectPart part in group.Parts) - { - if ((part.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0) - { - part.LastOwnerID = part.OwnerID; - part.OwnerID = item.Owner; - part.Inventory.ChangeInventoryOwner(item.Owner); - part.GroupMask = 0; // DO NOT propagate here - } - if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) - part.EveryoneMask = item.EveryOnePermissions; - if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0) - part.NextOwnerMask = item.NextPermissions; - if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) - part.GroupMask = item.GroupPermissions; - } - rootPart.TrimPermissions(); if (!attachment) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index fa404c01bd..3281eabd33 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -175,12 +175,12 @@ namespace OpenSim.Region.Framework.Scenes foreach (TaskInventoryItem item in items) { if (ownerId != item.OwnerID) - { item.LastOwnerID = item.OwnerID; - item.OwnerID = ownerId; - item.PermsMask = 0; - item.PermsGranter = UUID.Zero; - } + + item.OwnerID = ownerId; + item.PermsMask = 0; + item.PermsGranter = UUID.Zero; + item.OwnerChanged = true; } }