From 658524311307561a133451753daceff493d3cdad Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 8 Nov 2010 02:35:47 +0000 Subject: [PATCH 01/18] Detach attachments displaced by other attachments --- .../Avatar/Attachments/AttachmentsModule.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index e89368a4b6..9c1154b585 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -178,12 +178,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments UUID itemID = UUID.Zero; if (sp != null) { - foreach (SceneObjectGroup grp in sp.GetAttachments(AttachmentPt)) + foreach(SceneObjectGroup grp in sp.Attachments) { - itemID = grp.GetFromItemID(); - if (itemID != UUID.Zero) - DetachSingleAttachmentToInv(itemID, remoteClient); + if (grp.GetAttachmentPoint() == (byte)AttachmentPt) + { + itemID = grp.GetFromItemID(); + break; + } } + if (itemID != UUID.Zero) + DetachSingleAttachmentToInv(itemID, remoteClient); } if (group.GetFromItemID() == UUID.Zero) From 2317b6767beb1c171a8a9b087510ad4111ec0a01 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 24 Aug 2010 18:20:24 +0200 Subject: [PATCH 02/18] Add a method to delete left over / dropped attachments --- OpenSim/Region/Framework/Scenes/Scene.cs | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3343d081ab..be01d44711 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4984,5 +4984,37 @@ namespace OpenSim.Region.Framework.Scenes throw new Exception(error); } } + + public void CleanDroppedAttachments() + { + List objectsToDelete = + new List(); + + ForEachSOG(delegate (SceneObjectGroup grp) + { + if (grp.RootPart.Shape.State != 0) + { + UUID agentID = grp.OwnerID; + if (agentID == UUID.Zero) + { + objectsToDelete.Add(grp); + return; + } + + ScenePresence sp = GetScenePresence(agentID); + if (sp == null) + { + objectsToDelete.Add(grp); + return; + } + } + }); + + foreach (SceneObjectGroup grp in objectsToDelete) + { + m_log.InfoFormat("[SCENE]: Deleting dropped attachment {0} of user {1}", grp.UUID, grp.OwnerID); + DeleteSceneObject(grp, true); + } + } } } From d8fffd0fb573d7ca27c1eac311c11b969190ce23 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 24 Aug 2010 18:38:54 +0200 Subject: [PATCH 03/18] Call attachment cleanup when an agent crosses out --- .../Framework/EntityTransfer/EntityTransferModule.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 485e05ab1c..b5cab84e67 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -459,6 +459,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Now let's make it officially a child agent sp.MakeChildAgent(); + sp.Scene.CleanDroppedAttachments(); + // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone if (NeedsClosing(oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) From 2f58d561371ed93202c276dfe0c359fcf6f70358 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 8 Nov 2010 02:37:28 +0000 Subject: [PATCH 04/18] Call the Cleanup when an agent logs out, when an agent leaves and just before an agent logs in directly. Intentionally not calling this from MakeRoot as that would mess up attachment transfer in teleport --- OpenSim/Region/Framework/Scenes/Scene.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index be01d44711..dd817ce917 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3154,6 +3154,7 @@ namespace OpenSim.Region.Framework.Scenes } m_eventManager.TriggerClientClosed(agentID, this); + CleanDroppedAttachments(); } catch (NullReferenceException) { @@ -3408,6 +3409,8 @@ namespace OpenSim.Region.Framework.Scenes if (vialogin) { + CleanDroppedAttachments(); + if (TestBorderCross(agent.startpos, Cardinals.E)) { Border crossedBorder = GetCrossedBorder(agent.startpos, Cardinals.E); From 4f6dd8bda38a2b336506e24f8c41c8d8ebe2d69b Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 8 Nov 2010 02:38:15 +0000 Subject: [PATCH 05/18] Call the cleanup after saving attachment states, so that the attachments don't get killed before they can be saved --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index dd817ce917..77d747201f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3154,7 +3154,6 @@ namespace OpenSim.Region.Framework.Scenes } m_eventManager.TriggerClientClosed(agentID, this); - CleanDroppedAttachments(); } catch (NullReferenceException) { @@ -3163,6 +3162,9 @@ namespace OpenSim.Region.Framework.Scenes } m_eventManager.TriggerOnRemovePresence(agentID); + + CleanDroppedAttachments(); + ForEachClient( delegate(IClientAPI client) { From 18b27408d6af27a3880298c6f3acdaef3fb7d030 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 8 Nov 2010 02:39:06 +0000 Subject: [PATCH 06/18] Prevent plants from being treated like dropped attachments and removed from the sim. --- OpenSim/Region/Framework/Scenes/Scene.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 77d747201f..3576a88b7c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4999,8 +4999,7 @@ namespace OpenSim.Region.Framework.Scenes { if (grp.RootPart.Shape.State != 0) { - UUID agentID = grp.OwnerID; - if (agentID == UUID.Zero) + if (grp.RootPart.Shape.PCode == 0 && grp.RootPart.Shape.State != 0 && (!objectsToDelete.Contains(grp))) { objectsToDelete.Add(grp); return; From 6056ae8d88ad683ff20cbef918df99c3ad3728f4 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 8 Nov 2010 02:58:33 +0000 Subject: [PATCH 07/18] Fix merge artefacts --- OpenSim/Region/Framework/Scenes/Scene.cs | 33 ++++++++++++++---------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3576a88b7c..3fc195a5ea 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -174,6 +174,7 @@ namespace OpenSim.Region.Framework.Scenes private bool m_firstHeartbeat = true; private object m_deleting_scene_object = new object(); + private object m_cleaningAttachments = new object(); private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; private bool m_reprioritizationEnabled = true; @@ -4995,25 +4996,29 @@ namespace OpenSim.Region.Framework.Scenes List objectsToDelete = new List(); - ForEachSOG(delegate (SceneObjectGroup grp) - { - if (grp.RootPart.Shape.State != 0) + lock (m_cleaningAttachments) + { + ForEachSOG(delegate (SceneObjectGroup grp) { if (grp.RootPart.Shape.PCode == 0 && grp.RootPart.Shape.State != 0 && (!objectsToDelete.Contains(grp))) { - objectsToDelete.Add(grp); - return; - } + UUID agentID = grp.OwnerID; + if (agentID == UUID.Zero) + { + objectsToDelete.Add(grp); + return; + } - ScenePresence sp = GetScenePresence(agentID); - if (sp == null) - { - objectsToDelete.Add(grp); - return; + ScenePresence sp = GetScenePresence(agentID); + if (sp == null) + { + objectsToDelete.Add(grp); + return; + } } - } - }); - + }); + } + foreach (SceneObjectGroup grp in objectsToDelete) { m_log.InfoFormat("[SCENE]: Deleting dropped attachment {0} of user {1}", grp.UUID, grp.OwnerID); From 798abd1508354e8af824f97121bc834d98e85648 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 8 Nov 2010 03:06:58 +0000 Subject: [PATCH 08/18] Reinstate a lost fix --- OpenSim/Region/Framework/Scenes/Scene.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3fc195a5ea..94a773d3d0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3164,8 +3164,6 @@ namespace OpenSim.Region.Framework.Scenes m_eventManager.TriggerOnRemovePresence(agentID); - CleanDroppedAttachments(); - ForEachClient( delegate(IClientAPI client) { @@ -3198,6 +3196,7 @@ namespace OpenSim.Region.Framework.Scenes } m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode); + CleanDroppedAttachments(); //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); } From ae9c4a4d118e126b4f849bbfed112d0971459339 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 8 Nov 2010 07:48:35 -0500 Subject: [PATCH 09/18] Formatting cleanup. --- .../RemoteController/RemoteAdminPlugin.cs | 2 +- OpenSim/Framework/AgentCircuitData.cs | 6 +- OpenSim/Framework/AvatarAppearance.cs | 77 +++++++++---------- OpenSim/Framework/ChildAgentDataUpdate.cs | 6 +- OpenSim/Framework/MainServer.cs | 6 +- .../ClientStack/LindenUDP/LLUDPServer.cs | 4 +- .../Avatar/Attachments/AttachmentsModule.cs | 2 +- .../AvatarFactory/AvatarFactoryModule.cs | 63 ++++++++------- .../Region/Framework/Scenes/ScenePresence.cs | 2 +- .../SimianAvatarServiceConnector.cs | 6 +- 10 files changed, 86 insertions(+), 88 deletions(-) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 854307c1e8..15adb9945f 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -117,7 +117,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController m_application = openSim; string bind_ip_address = m_config.GetString("bind_ip_address", "0.0.0.0"); - IPAddress ipaddr = IPAddress.Parse( bind_ip_address ); + IPAddress ipaddr = IPAddress.Parse(bind_ip_address); m_httpServer = MainServer.GetHttpServer((uint)port,ipaddr); Dictionary availableMethods = new Dictionary(); diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index 7b14ac78f7..cc9fcea2e7 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs @@ -203,7 +203,7 @@ namespace OpenSim.Framework args["inventory_folder"] = OSD.FromUUID(InventoryFolder); args["secure_session_id"] = OSD.FromUUID(SecureSessionID); args["session_id"] = OSD.FromUUID(SessionID); - + args["service_session_id"] = OSD.FromString(ServiceSessionID); args["start_pos"] = OSD.FromString(startpos.ToString()); args["client_ip"] = OSD.FromString(IPAddress); @@ -219,7 +219,7 @@ namespace OpenSim.Framework OSDMap appmap = Appearance.Pack(); args["packed_appearance"] = appmap; } - + if (ServiceURLs != null && ServiceURLs.Count > 0) { OSDArray urls = new OSDArray(ServiceURLs.Count * 2); @@ -307,7 +307,7 @@ namespace OpenSim.Framework // DEBUG OFF try { - // Unpack various appearance elements + // Unpack various appearance elements Appearance = new AvatarAppearance(AgentID); // Eventually this code should be deprecated, use full appearance diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 69e1ae6c7b..2906af87d4 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -46,7 +46,7 @@ namespace OpenSim.Framework public readonly static int TEXTURE_COUNT = 21; public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; - + protected UUID m_owner; protected int m_serial = 1; protected byte[] m_visualparams; @@ -110,10 +110,10 @@ namespace OpenSim.Framework SetDefaultTexture(); SetDefaultParams(); SetHeight(); - + m_attachments = new Dictionary>(); } - + public AvatarAppearance(UUID avatarID, OSDMap map) { // m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance for {0} from OSDMap",avatarID); @@ -122,11 +122,11 @@ namespace OpenSim.Framework Unpack(map); SetHeight(); } - + public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams) { // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID); - + m_serial = 1; m_owner = avatarID; @@ -134,7 +134,7 @@ namespace OpenSim.Framework m_wearables = wearables; else SetDefaultWearables(); - + if (textureEntry != null) m_texture = textureEntry; else @@ -172,41 +172,41 @@ namespace OpenSim.Framework return; } - + m_serial = appearance.Serial; m_owner = appearance.Owner; m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; - for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ ) + for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) m_wearables[i] = new AvatarWearable(); if (copyWearables && (appearance.Wearables != null)) { for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) SetWearable(i,appearance.Wearables[i]); } - + m_texture = null; if (appearance.Texture != null) { byte[] tbytes = appearance.Texture.GetBytes(); m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length); } - + m_visualparams = null; if (appearance.VisualParams != null) m_visualparams = (byte[])appearance.VisualParams.Clone(); - + // Copy the attachment, force append mode since that ensures consistency m_attachments = new Dictionary>(); foreach (AvatarAttachment attachment in appearance.GetAttachments()) AppendAttachment(new AvatarAttachment(attachment)); } - + public void GetAssetsFrom(AvatarAppearance app) { - for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ ) + for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) { - for (int j = 0 ; j < m_wearables[i].Count ; j++) + for (int j = 0; j < m_wearables[i].Count; j++) { UUID itemID = m_wearables[i][j].ItemID; UUID assetID = app.Wearables[i].GetAsset(itemID); @@ -220,7 +220,7 @@ namespace OpenSim.Framework public void ClearWearables() { m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; - for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ ) + for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) m_wearables[i] = new AvatarWearable(); } @@ -248,7 +248,7 @@ namespace OpenSim.Framework /// /// Set up appearance textures. /// Returns boolean that indicates whether the new entries actually change the - /// existing values. + /// existing values. /// public virtual bool SetTextureEntries(Primitive.TextureEntry textureEntry) { @@ -263,7 +263,7 @@ namespace OpenSim.Framework { Primitive.TextureEntryFace newface = textureEntry.FaceTextures[i]; Primitive.TextureEntryFace oldface = m_texture.FaceTextures[i]; - + if (newface == null) { if (oldface == null) continue; @@ -274,7 +274,7 @@ namespace OpenSim.Framework } changed = true; - + // if (newface != null) // m_log.WarnFormat("[AVATAR APPEARANCE]: index {0}, new texture id {1}",i,newface.TextureID); } @@ -282,11 +282,11 @@ namespace OpenSim.Framework m_texture = textureEntry; return changed; } - + /// /// Set up visual parameters for the avatar and refresh the avatar height /// Returns boolean that indicates whether the new entries actually change the - /// existing values. + /// existing values. /// public virtual bool SetVisualParams(byte[] visualParams) { @@ -316,13 +316,13 @@ namespace OpenSim.Framework return changed; } - + public virtual void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams) { SetTextureEntries(textureEntry); SetVisualParams(visualParams); } - + public virtual void SetHeight() { m_avatarHeight = 1.23077f // Shortest possible avatar height @@ -347,25 +347,24 @@ namespace OpenSim.Framework // m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID); // DEBUG OFF m_wearables[wearableId].Clear(); - for (int i = 0 ; i < wearable.Count ; i++) + for (int i = 0; i < wearable.Count; i++) m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID); } - // DEBUG ON public override String ToString() { String s = ""; s += String.Format("Serial: {0}\n",m_serial); - + for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++) if (m_texture.FaceTextures[i] != null) s += String.Format("Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID); foreach (AvatarWearable awear in m_wearables) { - for ( int i = 0 ; i < awear.Count ; i++ ) + for (int i = 0; i < awear.Count; i++) s += String.Format("Wearable: item={0}, asset={1}\n",awear[i].ItemID,awear[i].AssetID); } @@ -373,13 +372,13 @@ namespace OpenSim.Framework for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++) s += String.Format("{0},",m_visualparams[j]); s += "\n"; - + return s; } // DEBUG OFF /// - /// Get a list of the attachments, note that there may be + /// Get a list of the attachments, note that there may be /// duplicate attachpoints /// public List GetAttachments() @@ -390,10 +389,10 @@ namespace OpenSim.Framework foreach (AvatarAttachment attach in kvp.Value) alist.Add(new AvatarAttachment(attach)); } - + return alist; } - + internal void AppendAttachment(AvatarAttachment attach) { if (! m_attachments.ContainsKey(attach.AttachPoint)) @@ -406,11 +405,11 @@ namespace OpenSim.Framework m_attachments[attach.AttachPoint] = new List(); m_attachments[attach.AttachPoint].Add(attach); } - + /// - /// Add an attachment, if the attachpoint has the + /// Add an attachment, if the attachpoint has the /// 0x80 bit set then we assume this is an append - /// operation otherwise we replace whatever is + /// operation otherwise we replace whatever is /// currently attached at the attachpoint /// public void SetAttachment(int attachpoint, UUID item, UUID asset) @@ -485,14 +484,14 @@ namespace OpenSim.Framework data["serial"] = OSD.FromInteger(m_serial); data["height"] = OSD.FromReal(m_avatarHeight); data["hipoffset"] = OSD.FromReal(m_hipOffset); - + // Wearables OSDArray wears = new OSDArray(AvatarWearable.MAX_WEARABLES); - for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) + for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) wears.Add(m_wearables[i].Pack()); data["wearables"] = wears; - // Avatar Textures + // Avatar Textures OSDArray textures = new OSDArray(AvatarAppearance.TEXTURE_COUNT); for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++) { @@ -506,7 +505,7 @@ namespace OpenSim.Framework // Visual Parameters OSDBinary visualparams = new OSDBinary(m_visualparams); data["visualparams"] = visualparams; - + // Attachments OSDArray attachs = new OSDArray(m_attachments.Count); foreach (AvatarAttachment attach in GetAttachments()) @@ -529,14 +528,14 @@ namespace OpenSim.Framework if ((data != null) && (data["hipoffset"] != null)) m_hipOffset = (float)data["hipoffset"].AsReal(); - try + try { // Wearables SetDefaultWearables(); if ((data != null) && (data["wearables"] != null) && (data["wearables"]).Type == OSDType.Array) { OSDArray wears = (OSDArray)(data["wearables"]); - for (int i = 0; i < wears.Count; i++) + for (int i = 0; i < wears.Count; i++) m_wearables[i] = new AvatarWearable((OSDArray)wears[i]); } else diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index ddfaaed4b0..a2273385e0 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs @@ -333,7 +333,7 @@ namespace OpenSim.Framework { // DEBUG ON m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Pack data"); -// DEBUG OFF +// DEBUG OFF OSDMap args = new OSDMap(); args["message_type"] = OSD.FromString("AgentData"); @@ -456,7 +456,7 @@ namespace OpenSim.Framework { // DEBUG ON m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Unpack data"); -// DEBUG OFF +// DEBUG OFF if (args.ContainsKey("region_id")) UUID.TryParse(args["region_id"].AsString(), out RegionID); @@ -616,7 +616,7 @@ namespace OpenSim.Framework // DEBUG ON else m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance"); -// DEBUG OFF +// DEBUG OFF if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array) { diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs index 8ccabece50..0515b166e2 100644 --- a/OpenSim/Framework/MainServer.cs +++ b/OpenSim/Framework/MainServer.cs @@ -36,7 +36,7 @@ namespace OpenSim.Framework public class MainServer { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + private static BaseHttpServer instance = null; private static Dictionary m_Servers = new Dictionary(); @@ -64,8 +64,8 @@ namespace OpenSim.Framework m_Servers[port] = new BaseHttpServer(port); - if (ipaddr != null ) - m_Servers[port].ListenIPAddress = ipaddr; + if (ipaddr != null) + m_Servers[port].ListenIPAddress = ipaddr; m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port); m_Servers[port].Start(); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 821f679c9d..b5d8ec8dc5 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -615,7 +615,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // UseCircuitCode handling if (packet.Type == PacketType.UseCircuitCode) - { + { object[] array = new object[] { buffer, packet }; if (m_asyncPacketHandling) @@ -843,7 +843,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_log.DebugFormat( "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", - buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); + buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); } private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 9c1154b585..348b8b909d 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -178,7 +178,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments UUID itemID = UUID.Zero; if (sp != null) { - foreach(SceneObjectGroup grp in sp.Attachments) + foreach (SceneObjectGroup grp in sp.Attachments) { if (grp.GetAttachmentPoint() == (byte)AttachmentPt) { diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 7f482cb890..2dd444d523 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { scene.RegisterModuleInterface(this); scene.EventManager.OnNewClient += NewClient; - + if (config != null) { IConfig sconfig = config.Configs["Startup"]; @@ -138,7 +138,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory return cached; } - /// /// Set appearance data (textureentry and slider settings) received from the client @@ -155,9 +154,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance unable to find presence for {0}",client.AgentId); return; } - + bool changed = false; - + // Process the texture entry if (textureEntry != null) { @@ -174,7 +173,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory }); } } - + // Process the visual params, this may change height as well if (visualParams != null) { @@ -185,14 +184,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory sp.SetHeight(sp.Appearance.AvatarHeight); } } - + // If something changed in the appearance then queue an appearance save if (changed) QueueAppearanceSave(client.AgentId); // And always queue up an appearance update to send out QueueAppearanceSend(client.AgentId); - + // Send the appearance back to the avatar // AvatarAppearance avp = sp.Appearance; // sp.ControllingClient.SendAvatarDataImmediate(sp); @@ -216,35 +215,35 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory } return true; } - + #region UpdateAppearanceTimer public void QueueAppearanceSend(UUID agentid) { -// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance send for {0}",agentid); +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance send for {0}", agentid); // 100 nanoseconds (ticks) we should wait - long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 10000000); + long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 10000000); lock (m_sendqueue) { m_sendqueue[agentid] = timestamp; m_updateTimer.Start(); } } - + public void QueueAppearanceSave(UUID agentid) { -// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance save for {0}",agentid); +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance save for {0}", agentid); // 100 nanoseconds (ticks) we should wait - long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 10000000); + long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 10000000); lock (m_savequeue) { m_savequeue[agentid] = timestamp; m_updateTimer.Start(); } } - + private void HandleAppearanceSend(UUID agentid) { ScenePresence sp = m_scene.GetScenePresence(agentid); @@ -254,7 +253,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory return; } -// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Handle appearance send for {0}", agentid); +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Handle appearance send for {0}", agentid); // Send the appearance to everyone in the scene sp.SendAppearanceToAllOtherAgents(); @@ -262,7 +261,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // Send the appearance back to the avatar // AvatarAppearance avp = sp.Appearance; - // sp.ControllingClient.SendAppearance(avp.Owner,avp.VisualParams,avp.Texture.GetBytes()); + // sp.ControllingClient.SendAppearance(avp.Owner, avp.VisualParams, avp.Texture.GetBytes()); /* // this needs to be fixed, the flag should be on scene presence not the region module @@ -290,11 +289,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory private void HandleAppearanceUpdateTimer(object sender, EventArgs ea) { long now = DateTime.Now.Ticks; - + lock (m_sendqueue) { - Dictionary sends = new Dictionary(m_sendqueue); - foreach (KeyValuePair kvp in sends) + Dictionary sends = new Dictionary(m_sendqueue); + foreach (KeyValuePair kvp in sends) { if (kvp.Value < now) { @@ -306,8 +305,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory lock (m_savequeue) { - Dictionary saves = new Dictionary(m_savequeue); - foreach (KeyValuePair kvp in saves) + Dictionary saves = new Dictionary(m_savequeue); + foreach (KeyValuePair kvp in saves) { if (kvp.Value < now) { @@ -320,7 +319,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory if (m_savequeue.Count == 0 && m_sendqueue.Count == 0) m_updateTimer.Stop(); } - + #endregion /// @@ -336,8 +335,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory } // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Received request for wearables of {0}", client.AgentId); - - client.SendWearables(sp.Appearance.Wearables,sp.Appearance.Serial++); + + client.SendWearables(sp.Appearance.Wearables, sp.Appearance.Serial++); } /// @@ -353,17 +352,17 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing unable to find presence for {0}", client.AgentId); return; } - -// m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}",client.AgentId); + +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}", client.AgentId); AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false); foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) { if (wear.Type < AvatarWearable.MAX_WEARABLES) - avatAppearance.Wearables[wear.Type].Add(wear.ItemID,UUID.Zero); + avatAppearance.Wearables[wear.Type].Add(wear.ItemID, UUID.Zero); } - + avatAppearance.GetAssetsFrom(sp.Appearance); // This could take awhile since it needs to pull inventory @@ -381,11 +380,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) { - for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ ) + for (int j = 0; j < appearance.Wearables[j].Count; j++) { if (appearance.Wearables[i][j].ItemID == UUID.Zero) continue; - + // Ignore ruth's assets if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID) continue; @@ -399,9 +398,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory else { m_log.ErrorFormat( - "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default", + "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default", appearance.Wearables[i][j].ItemID, (WearableType)i); - + appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID); } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 964f8cb901..34d1c39332 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1133,7 +1133,7 @@ namespace OpenSim.Region.Framework.Scenes m_log.DebugFormat( "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", - client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); + client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); } /// diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index 7a28c2b737..65a02df390 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs @@ -125,7 +125,7 @@ namespace OpenSim.Services.Connectors.SimianGrid OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); if (response["Success"].AsBoolean()) { - OSDMap map = null; + OSDMap map = null; try { map = OSDParser.DeserializeJson(response["LLPackedAppearance"].AsString()) as OSDMap; } catch { } @@ -134,7 +134,7 @@ namespace OpenSim.Services.Connectors.SimianGrid AvatarAppearance appearance = new AvatarAppearance(map); // DEBUG ON m_log.WarnFormat("[SIMIAN AVATAR CONNECTOR] retrieved appearance for {0}:\n{1}",userID,appearance.ToString()); -// DEBUG OFF +// DEBUG OFF return appearance; } @@ -161,7 +161,7 @@ namespace OpenSim.Services.Connectors.SimianGrid // DEBUG ON m_log.WarnFormat("[SIMIAN AVATAR CONNECTOR] save appearance for {0}",userID); -// DEBUG OFF +// DEBUG OFF NameValueCollection requestArgs = new NameValueCollection { From 22144eb8f74207fedb1042cbcf9f7ade3e2eca59 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 9 Nov 2010 20:18:36 +0100 Subject: [PATCH 10/18] Fix parcel bans to work only on the avatars they're supposed to work on instead of pushing all avatars, even the ones that are allowed. --- .../World/Land/LandManagementModule.cs | 29 ++++++++++--------- OpenSim/Region/Framework/Scenes/Scene.cs | 1 - 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 634685ace0..695202f741 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -88,7 +88,8 @@ namespace OpenSim.Region.CoreModules.World.Land // caches ExtendedLandData private Cache parcelInfoCache; - private Vector3? forcedPosition = null; + private Dictionary forcedPosition = + new Dictionary(); #region INonSharedRegionModule Members @@ -177,7 +178,7 @@ namespace OpenSim.Region.CoreModules.World.Land void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) { //If we are forcing a position for them to go - if (forcedPosition != null) + if (forcedPosition.ContainsKey(remoteClient.AgentId)) { ScenePresence clientAvatar = m_scene.GetScenePresence(remoteClient.AgentId); @@ -187,23 +188,23 @@ namespace OpenSim.Region.CoreModules.World.Land //Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines - if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) < .2) + if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) < .2) { - Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); - forcedPosition = null; + Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition)); + forcedPosition.Remove(remoteClient.AgentId); } //if we are far away, teleport - else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) + else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) > 3) { - Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); - clientAvatar.Teleport(forcedPosition.Value); - forcedPosition = null; + Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition)); + clientAvatar.Teleport(forcedPosition[remoteClient.AgentId]); + forcedPosition.Remove(remoteClient.AgentId); } else { //Forces them toward the forced position we want if they aren't there yet agentData.UseClientAgentPosition = true; - agentData.ClientAgentPosition = forcedPosition.Value; + agentData.ClientAgentPosition = forcedPosition[remoteClient.AgentId]; } } } @@ -326,7 +327,7 @@ namespace OpenSim.Region.CoreModules.World.Land if (m_scene.Permissions.IsGod(avatar.UUID)) return; if (position.HasValue) { - forcedPosition = position; + forcedPosition[avatar.ControllingClient.AgentId] = (Vector3)position; } } @@ -457,7 +458,7 @@ namespace OpenSim.Region.CoreModules.World.Land parcel.IsBannedFromLand(clientAvatar.UUID)) { //once we've sent the message once, keep going toward the target until we are done - if (forcedPosition == null) + if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) { SendYouAreBannedNotice(clientAvatar); ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); @@ -466,7 +467,7 @@ namespace OpenSim.Region.CoreModules.World.Land else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) { //once we've sent the message once, keep going toward the target until we are done - if (forcedPosition == null) + if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) { SendYouAreRestrictedNotice(clientAvatar); ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); @@ -475,7 +476,7 @@ namespace OpenSim.Region.CoreModules.World.Land else { //when we are finally in a safe place, lets release the forced position lock - forcedPosition = null; + forcedPosition.Remove(clientAvatar.ControllingClient.AgentId); } } } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 94a773d3d0..c5396d5741 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4740,7 +4740,6 @@ namespace OpenSim.Region.Framework.Scenes Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); return nearestRegionEdgePoint; - return null; } private Vector3 GetParcelCenterAtGround(ILandObject parcel) From 846198bb9ef6aec8a3f351de8ef4393d6b7f35bd Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 9 Nov 2010 23:54:08 +0000 Subject: [PATCH 11/18] Although the Allow Voice setting is per estate rather than per region, apparently it is required in the region handshake to let the client enable parcel voice controls. So, send it. --- .../Region/CoreModules/World/Estate/EstateManagementModule.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 1bf0d67497..6844c6024a 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -1098,12 +1098,14 @@ namespace OpenSim.Region.CoreModules.World.Estate if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide) flags |= RegionFlags.AllowParcelChanges; if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch) - flags |= (RegionFlags)(1 << 29); + flags |= RegionFlags.BlockParcelSearch; if (m_scene.RegionInfo.RegionSettings.FixedSun) flags |= RegionFlags.SunFixed; if (m_scene.RegionInfo.RegionSettings.Sandbox) flags |= RegionFlags.Sandbox; + if (m_scene.RegionInfo.EstateSettings.AllowVoice) + flags |= RegionFlags.AllowVoice; // Fudge these to always on, so the menu options activate // From ff3e466000f31f76bfbae66bf29f5c4bb030529c Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 10 Nov 2010 01:17:40 +0000 Subject: [PATCH 12/18] Remove a debug spam --- OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index 8df645dd32..abd28c87a9 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs @@ -97,7 +97,6 @@ namespace OpenSim.Region.CoreModules.World.Sound else gain = (float)((double)gain * ((radius - dis) / radius)); - m_log.DebugFormat("Play sound, gain {0}", gain); sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags); }); } From bfc128529ca29525751fc3c8edd25859446a2954 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 10 Nov 2010 16:22:55 +0100 Subject: [PATCH 13/18] Prevent teleporting to a region when the egent is banned in all parcels --- OpenSim/Region/Framework/Scenes/Scene.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c5396d5741..a4cc66d760 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3761,6 +3761,13 @@ namespace OpenSim.Region.Framework.Scenes // We have to wait until the viewer contacts this region after receiving EAC. // That calls AddNewClient, which finally creates the ScenePresence + ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2); + if (nearestParcel == null) + { + m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: no allowed parcel", cAgentData.AgentID); + return false; + } + ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); if (childAgentUpdate != null) { From 00b0f521fa6c2a99f7878a7eb36e8e7b8df01e31 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Mon, 8 Nov 2010 12:15:20 -0500 Subject: [PATCH 14/18] Add PARCEL_DETAILS_ID to LSL --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 3 +++ .../Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1a13deae5a..c251a49ccb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -9882,6 +9882,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case "4": ret = ret + new LSL_List(land.Area); break; + case "5": + ret = ret + new LSL_List(land.GlobalID); + break; default: ret = ret + new LSL_List(0); break; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index b96e977539..b3c4d95c48 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -507,6 +507,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PARCEL_DETAILS_OWNER = 2; public const int PARCEL_DETAILS_GROUP = 3; public const int PARCEL_DETAILS_AREA = 4; + public const int PARCEL_DETAILS_ID = 5; // constants for llSetClickAction public const int CLICK_ACTION_NONE = 0; From 672ee2a88888438c964279d367feb273080d6f3e Mon Sep 17 00:00:00 2001 From: BlueWall Date: Tue, 9 Nov 2010 17:19:38 -0500 Subject: [PATCH 15/18] Prebuild fix Make prebuild fix for monodevelop. Needed path to reference legacy Mono.Data.SQLite in ./bin/Mono.Data.SQLite.dll. --- prebuild.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prebuild.xml b/prebuild.xml index c6eb65a790..9df820e2b2 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -2155,7 +2155,7 @@ - + @@ -2503,7 +2503,7 @@ - + From 9c8680cd693e7d54635150c07587f9ed1d4ff04e Mon Sep 17 00:00:00 2001 From: BlueWall Date: Fri, 12 Nov 2010 07:40:36 -0500 Subject: [PATCH 16/18] Fix prebubild.exe for Nant add missing "/" fixes Nant builds --- prebuild.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prebuild.xml b/prebuild.xml index 9df820e2b2..e77d5c1fd2 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -2155,7 +2155,7 @@ - + From 1e7334d9859e20ba6bc5652f9d61ce9d0bff8906 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 12 Nov 2010 23:20:07 +0000 Subject: [PATCH 17/18] provide avatar name in log if an exception ends up at the top of an async packet processing stack --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 4aa19d1009..8d85d1a34f 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -651,8 +651,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP catch (Exception e) { // Make sure that we see any exception caused by the asynchronous operation. - m_log.Error( - string.Format("[LLCLIENTVIEW]: Caught exception while processing {0}", packetObject.Pack), e); + m_log.ErrorFormat( + "[LLCLIENTVIEW]: Caught exception while processing {0} for {1}, {2} {3}", + packetObject.Pack, Name, e.Message, e.StackTrace); } } From 2368aab534a9534f5f2806d5a4ffeb75950fdafd Mon Sep 17 00:00:00 2001 From: Marck Date: Thu, 11 Nov 2010 11:08:57 +0100 Subject: [PATCH 18/18] Fix: Write asset data into Asset.db when using SQLite --- bin/config-include/storage/SQLiteLegacyStandalone.ini | 3 +++ bin/config-include/storage/SQLiteStandalone.ini | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bin/config-include/storage/SQLiteLegacyStandalone.ini b/bin/config-include/storage/SQLiteLegacyStandalone.ini index facbbd6bcd..ffe9a70ca8 100644 --- a/bin/config-include/storage/SQLiteLegacyStandalone.ini +++ b/bin/config-include/storage/SQLiteLegacyStandalone.ini @@ -4,6 +4,9 @@ StorageProvider = "OpenSim.Data.SQLiteLegacy.dll" ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" +[AssetService] + ConnectionString = "URI=file:Asset.db,version=3" + [AvatarService] ConnectionString = "URI=file:avatars.db,version=3" diff --git a/bin/config-include/storage/SQLiteStandalone.ini b/bin/config-include/storage/SQLiteStandalone.ini index 10e6991954..c1de71aa21 100644 --- a/bin/config-include/storage/SQLiteStandalone.ini +++ b/bin/config-include/storage/SQLiteStandalone.ini @@ -4,6 +4,9 @@ StorageProvider = "OpenSim.Data.SQLite.dll" ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" +[AssetService] + ConnectionString = "URI=file:Asset.db,version=3" + [InventoryService] ;ConnectionString = "URI=file:inventory.db,version=3" ; if you have a legacy inventory store use the connection string below