From 1a18948935eb6dcb65fb7a75b241ede9d42af055 Mon Sep 17 00:00:00 2001 From: Snoopy Pfeffer Date: Fri, 3 Feb 2012 23:04:18 +0100 Subject: Corrected console help texts for "save iar" --- .../CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 150d913..09b4ba6 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -122,7 +122,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver scene.AddCommand( this, "save iar", - "save iar [-h|--home=] [--noassets] [] [--v|-verbose]", + "save iar [-p|--profile=] [--noassets] [] [-c|--creators] [-v|--verbose]", "Save user inventory archive (IAR).", " is the user's first name." + Environment.NewLine + " is the user's last name." + Environment.NewLine @@ -408,7 +408,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (mainParams.Count < 6) { m_log.Error( - "[INVENTORY ARCHIVER]: usage is save iar [--p|-profile=] [--noassets] []"); + "[INVENTORY ARCHIVER]: usage is save iar [-p|--profile=] [--noassets] [] [-c|--creators] [-v|--verbose]"); return; } -- cgit v1.1 From 83ef13a79add392247ae8e36b419fdc8bc8c6b8b Mon Sep 17 00:00:00 2001 From: Snoopy Pfeffer Date: Fri, 3 Feb 2012 23:53:18 +0100 Subject: Changed save oar and save iar parameter -p|--profile to -h|--home, including corresponding RemoteAdmin parameter --- .../Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | 2 +- .../Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 10 +++++----- OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 36ecb3b..5238325 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -415,7 +415,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { int majorVersion, minorVersion; - if (options.ContainsKey("profile")) + if (options.ContainsKey("home")) { majorVersion = 1; minorVersion = 2; diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 09b4ba6..a81f36c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -122,7 +122,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver scene.AddCommand( this, "save iar", - "save iar [-p|--profile=] [--noassets] [] [-c|--creators] [-v|--verbose]", + "save iar [-h|--home=] [--noassets] [] [-c|--creators] [-v|--verbose]", "Save user inventory archive (IAR).", " is the user's first name." + Environment.NewLine + " is the user's last name." + Environment.NewLine @@ -396,7 +396,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver OptionSet ops = new OptionSet(); //ops.Add("v|version=", delegate(string v) { options["version"] = v; }); - ops.Add("p|profile=", delegate(string v) { options["profile"] = v; }); + ops.Add("h|home=", delegate(string v) { options["home"] = v; }); ops.Add("v|verbose", delegate(string v) { options["verbose"] = v; }); ops.Add("c|creators", delegate(string v) { options["creators"] = v; }); ops.Add("noassets", delegate(string v) { options["noassets"] = v != null; }); @@ -408,13 +408,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (mainParams.Count < 6) { m_log.Error( - "[INVENTORY ARCHIVER]: usage is save iar [-p|--profile=] [--noassets] [] [-c|--creators] [-v|--verbose]"); + "[INVENTORY ARCHIVER]: usage is save iar [-h|--home=] [--noassets] [] [-c|--creators] [-v|--verbose]"); return; } m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME."); - if (options.ContainsKey("profile")) - m_log.WarnFormat("[INVENTORY ARCHIVER]: Please be aware that inventory archives with creator information are not compatible with OpenSim 0.7.0.2 and earlier. Do not use the -profile option if you want to produce a compatible IAR"); + if (options.ContainsKey("home")) + m_log.WarnFormat("[INVENTORY ARCHIVER]: Please be aware that inventory archives with creator information are not compatible with OpenSim 0.7.0.2 and earlier. Do not use the -home option if you want to produce a compatible IAR"); string firstName = mainParams[2]; string lastName = mainParams[3]; diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 948aac8..8e29e3c 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs @@ -310,10 +310,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver protected AssetBase PostProcess(AssetBase asset) { - if (asset.Type == (sbyte)AssetType.Object && asset.Data != null && m_options.ContainsKey("profile")) + if (asset.Type == (sbyte)AssetType.Object && asset.Data != null && m_options.ContainsKey("home")) { //m_log.DebugFormat("[ARCHIVER]: Rewriting object data for {0}", asset.ID); - string xml = ExternalRepresentationUtils.RewriteSOP(Utils.BytesToString(asset.Data), m_options["profile"].ToString(), m_userAccountService, m_scopeID); + string xml = ExternalRepresentationUtils.RewriteSOP(Utils.BytesToString(asset.Data), m_options["home"].ToString(), m_userAccountService, m_scopeID); asset.Data = Utils.StringToBytes(xml); } return asset; -- cgit v1.1 From 5c545d1d2e0a1862d063a1bdf80d2cd2fa311101 Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Fri, 3 Feb 2012 22:02:36 +0100 Subject: Fix: Covenant changed time not set http://opensimulator.org/mantis/view.php?id=5869 Signed-off-by: BlueWall --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 8 ++++---- OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 2 ++ .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index cdd4957..8273c6f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -4439,7 +4439,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket(); EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); edata.CovenantID = covenant; - edata.CovenantTimestamp = 0; + edata.CovenantTimestamp = (uint) m_scene.RegionInfo.RegionSettings.CovenantChangedDateTime; edata.EstateOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; edata.EstateName = Utils.StringToBytes(m_scene.RegionInfo.EstateSettings.EstateName); einfopack.Data = edata; @@ -4447,8 +4447,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP } public void SendDetailedEstateData( - UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, - UUID covenant, string abuseEmail, UUID estateOwner) + UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, + UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner) { // m_log.DebugFormat( // "[LLCLIENTVIEW]: Sending detailed estate data to {0} with covenant asset id {1}", Name, covenant); @@ -4473,7 +4473,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP returnblock[4].Parameter = Utils.StringToBytes(sunPosition.ToString()); returnblock[5].Parameter = Utils.StringToBytes(parentEstate.ToString()); returnblock[6].Parameter = Utils.StringToBytes(covenant.ToString()); - returnblock[7].Parameter = Utils.StringToBytes("1160895077"); // what is this? + returnblock[7].Parameter = Utils.StringToBytes(covenantChanged.ToString()); returnblock[8].Parameter = Utils.StringToBytes("1"); // what is this? returnblock[9].Parameter = Utils.StringToBytes(abuseEmail); diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 2e1487f..c303d6d 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -80,6 +80,7 @@ namespace OpenSim.Region.CoreModules.World.Estate GetEstateFlags(), sun, Scene.RegionInfo.RegionSettings.Covenant, + (uint) Scene.RegionInfo.RegionSettings.CovenantChangedDateTime, Scene.RegionInfo.EstateSettings.AbuseEmail, estateOwner); @@ -268,6 +269,7 @@ namespace OpenSim.Region.CoreModules.World.Estate // remoteClient.Name, estateCovenantID); Scene.RegionInfo.RegionSettings.Covenant = estateCovenantID; + Scene.RegionInfo.RegionSettings.CovenantChangedDateTime = Util.UnixTimeSinceEpoch(); Scene.RegionInfo.RegionSettings.Save(); TriggerRegionInfoChange(); } diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 11f927c..c928af7 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1243,7 +1243,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) + public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner) { } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 81bf9ed..be0d56e 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -933,7 +933,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC public void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List SpawnPoint) { } - public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) + public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner) { } -- cgit v1.1 From ce34b359ad0254b6b4f460e2740e1a1ed30c456b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 3 Feb 2012 23:04:26 +0000 Subject: Extend m_avatars lock in NpcModule.CreateNPC over both creation of NPC scene presence and population of m_avatars. This is required to stop a race where the SensorRepeat module can detect an NPC avatar before m_avatars is populated. Extending the lock is the easiest to understand solution rather than getting complicated with null checks. Hopefully resolves http://opensimulator.org/mantis/view.php?id=5872 --- .../Region/OptionalModules/World/NPC/NPCModule.cs | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 3831d7a..6a48b89 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -140,24 +140,26 @@ namespace OpenSim.Region.OptionalModules.World.NPC // acd.AgentID, i, acd.Appearance.Texture.FaceTextures[i]); // } - scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd); - scene.AddNewClient(npcAvatar, PresenceType.Npc); - - ScenePresence sp; - if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) + lock (m_avatars) { - m_log.DebugFormat( - "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", sp.Name, sp.UUID); + scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd); + scene.AddNewClient(npcAvatar, PresenceType.Npc); - sp.CompleteMovement(npcAvatar, false); - } - else - { - m_log.WarnFormat("[NPC MODULE]: Could not find scene presence for NPC {0} {1}", sp.Name, sp.UUID); - } + ScenePresence sp; + if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) + { + m_log.DebugFormat( + "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", sp.Name, sp.UUID); + + sp.CompleteMovement(npcAvatar, false); + } + else + { + m_log.WarnFormat("[NPC MODULE]: Could not find scene presence for NPC {0} {1}", sp.Name, sp.UUID); + } - lock (m_avatars) m_avatars.Add(npcAvatar.AgentId, npcAvatar); + } m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId); -- cgit v1.1 From 107cef2b0e176a586ef81e3ada1cc3c1641c5467 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Fri, 3 Feb 2012 15:18:48 -0800 Subject: Check for null scene in ScheduleFullUpdate and ScheduleTerseUpdate before triggering events on a potentially null Scene --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 9b660b6..0e899ca 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2729,8 +2729,6 @@ namespace OpenSim.Region.Framework.Scenes if (ParentGroup == null) return; - ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); - ParentGroup.QueueForUpdateCheck(); int timeNow = Util.UnixTimeSinceEpoch(); @@ -2752,6 +2750,9 @@ namespace OpenSim.Region.Framework.Scenes // m_log.DebugFormat( // "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}", // UUID, Name, TimeStampFull); + + if (ParentGroup.Scene != null) + ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); } /// @@ -2763,13 +2764,12 @@ namespace OpenSim.Region.Framework.Scenes if (ParentGroup == null) return; - ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); - // This was pulled from SceneViewer. Attachments always receive full updates. // I could not verify if this is a requirement but this maintains existing behavior if (ParentGroup.IsAttachment) { ScheduleFullUpdate(); + return; } if (UpdateFlag == UpdateRequired.NONE) @@ -2784,6 +2784,9 @@ namespace OpenSim.Region.Framework.Scenes // "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}", // UUID, Name, TimeStampTerse); } + + if (ParentGroup.Scene != null) + ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); } public void ScriptSetPhysicsStatus(bool UsePhysics) -- cgit v1.1 From 312e1457dd576bc61ac2fd2e104813dd86134c4d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 3 Feb 2012 23:47:01 +0000 Subject: Change SceneObjectSerializer to use common ExternalRepresentationUtils.ExecuteReadProcessors() methods. Adds ability to submit a customized exception message to match logging. --- .../Scenes/Serialization/SceneObjectSerializer.cs | 103 ++++++--------------- 1 file changed, 29 insertions(+), 74 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index b54fcb7..ab02f92 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -34,6 +34,7 @@ using System.Xml; using log4net; using OpenMetaverse; using OpenSim.Framework; +using OpenSim.Framework.Serialization.External; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -276,14 +277,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization #region manual serialization - private delegate void SOPXmlProcessor(SceneObjectPart sop, XmlTextReader reader); - private static Dictionary m_SOPXmlProcessors = new Dictionary(); + private static Dictionary> m_SOPXmlProcessors + = new Dictionary>(); - private delegate void TaskInventoryXmlProcessor(TaskInventoryItem item, XmlTextReader reader); - private static Dictionary m_TaskInventoryXmlProcessors = new Dictionary(); + private static Dictionary> m_TaskInventoryXmlProcessors + = new Dictionary>(); - private delegate void ShapeXmlProcessor(PrimitiveBaseShape shape, XmlTextReader reader); - private static Dictionary m_ShapeXmlProcessors = new Dictionary(); + private static Dictionary> m_ShapeXmlProcessors + = new Dictionary>(); static SceneObjectSerializer() { @@ -1464,34 +1465,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization reader.ReadStartElement("SceneObjectPart"); - string nodeName = string.Empty; - while (reader.NodeType != XmlNodeType.EndElement) - { - nodeName = reader.Name; - SOPXmlProcessor p = null; - if (m_SOPXmlProcessors.TryGetValue(reader.Name, out p)) - { - //m_log.DebugFormat("[XXX] Processing: {0}", reader.Name); - try - { - p(obj, reader); - } - catch (Exception e) - { - m_log.DebugFormat( - "[SceneObjectSerializer]: exception while parsing {0} in object {1} {2}: {3}{4}", - obj.Name, obj.UUID, nodeName, e.Message, e.StackTrace); - if (reader.NodeType == XmlNodeType.EndElement) - reader.Read(); - } - } - else - { -// m_log.DebugFormat("[SceneObjectSerializer]: caught unknown element {0}", nodeName); - reader.ReadOuterXml(); // ignore - } - - } + ExternalRepresentationUtils.ExecuteReadProcessors( + obj, + m_SOPXmlProcessors, + reader, + (o, nodeName, e) + => m_log.ErrorFormat( + "[SceneObjectSerializer]: Exception while parsing {0} in object {1} {2}: {3}{4}", + ((SceneObjectPart)o).Name, ((SceneObjectPart)o).UUID, nodeName, e.Message, e.StackTrace)); reader.ReadEndElement(); // SceneObjectPart @@ -1516,17 +1497,12 @@ namespace OpenSim.Region.Framework.Scenes.Serialization reader.ReadStartElement("TaskInventoryItem", String.Empty); // TaskInventory TaskInventoryItem item = new TaskInventoryItem(); - while (reader.NodeType != XmlNodeType.EndElement) - { - TaskInventoryXmlProcessor p = null; - if (m_TaskInventoryXmlProcessors.TryGetValue(reader.Name, out p)) - p(item, reader); - else - { -// m_log.DebugFormat("[SceneObjectSerializer]: caught unknown element in TaskInventory {0}, {1}", reader.Name, reader.Value); - reader.ReadOuterXml(); - } - } + + ExternalRepresentationUtils.ExecuteReadProcessors( + item, + m_TaskInventoryXmlProcessors, + reader); + reader.ReadEndElement(); // TaskInventoryItem tinv.Add(item.ItemID, item); @@ -1559,35 +1535,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization reader.ReadStartElement(name, String.Empty); // Shape - string nodeName = string.Empty; - while (reader.NodeType != XmlNodeType.EndElement) - { - nodeName = reader.Name; - //m_log.DebugFormat("[XXX] Processing: {0}", reader.Name); - ShapeXmlProcessor p = null; - if (m_ShapeXmlProcessors.TryGetValue(reader.Name, out p)) - { - try - { - p(shape, reader); - } - catch (Exception e) - { - errors = true; - m_log.DebugFormat( - "[SceneObjectSerializer]: exception while parsing Shape property {0}: {1}{2}", - nodeName, e.Message, e.StackTrace); - - if (reader.NodeType == XmlNodeType.EndElement) - reader.Read(); - } - } - else - { - // m_log.DebugFormat("[SceneObjectSerializer]: caught unknown element in Shape {0}", reader.Name); - reader.ReadOuterXml(); - } - } + ExternalRepresentationUtils.ExecuteReadProcessors( + shape, + m_ShapeXmlProcessors, + reader, + (o, nodeName, e) + => m_log.ErrorFormat( + "[SceneObjectSerializer]: Exception while parsing Shape property {0}: {1}{2}", + nodeName, e.Message, e.StackTrace)); reader.ReadEndElement(); // Shape -- cgit v1.1 From 9b762a5a84004c2d5585a34e2fc10f41a7e626fd Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 4 Feb 2012 00:20:27 +0000 Subject: Only look for an uploaded transactional asset in Scene.UpdateTaskInventory if we have been passed a non-zero transaction ID. This resolves the recent regression from deeb728 where notecards could not be saved in prim inventories. This looks like a better solution than deeb728 since only non-caps updates pass in a transaction ID. Hopefully resolves http://opensimulator.org/mantis/view.php?id=5873 --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 39 +++++++++++----------- .../Scenes/Tests/SceneObjectScriptTests.cs | 2 +- .../Scenes/Tests/ScenePresenceAgentTests.cs | 2 +- 3 files changed, 21 insertions(+), 22 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index dd3208a..6d7559e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1473,26 +1473,25 @@ namespace OpenSim.Region.Framework.Scenes // "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", // currentItem.Name, part.Name); - // Viewers from at least Linden Lab 1.23 onwards use a capability to update script contents rather - // than UDP. With viewers from at least 1.23 onwards, changing properties on scripts (e.g. renaming) causes - // this to spew spurious errors and "thing saved" messages. - // Rather than retaining complexity in the code and removing useful error messages, I'm going to - // comment this section out. If this was still working for very old viewers and there is - // a large population using them which cannot upgrade to 1.23 or derivatives then we can revisit - // this - justincc -// IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); -// if (agentTransactions != null) -// { -// agentTransactions.HandleTaskItemUpdateFromTransaction( -// remoteClient, part, transactionID, currentItem); -// -// if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) -// remoteClient.SendAgentAlertMessage("Notecard saved", false); -// else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) -// remoteClient.SendAgentAlertMessage("Script saved", false); -// else -// remoteClient.SendAgentAlertMessage("Item saved", false); -// } + // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the + // case for updates uploded through UDP. Updates uploaded via a capability (e.g. a script update) + // will not pass in a transaction ID in the update message. + if (transactionID != UUID.Zero) + { + IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); + if (agentTransactions != null) + { + agentTransactions.HandleTaskItemUpdateFromTransaction( + remoteClient, part, transactionID, currentItem); + + if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) + remoteClient.SendAgentAlertMessage("Notecard saved", false); + else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) + remoteClient.SendAgentAlertMessage("Script saved", false); + else + remoteClient.SendAgentAlertMessage("Item saved", false); + } + } // Base ALWAYS has move currentItem.BasePermissions |= (uint)PermissionMask.Move; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs index 6f99abd..c582cf6 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs @@ -49,7 +49,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests // log4net.Config.XmlConfigurator.Configure(); UUID userId = TestHelpers.ParseTail(0x1); - UUID itemId = TestHelpers.ParseTail(0x2); +// UUID itemId = TestHelpers.ParseTail(0x2); string itemName = "Test Script Item"; Scene scene = SceneHelpers.SetupScene(); diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs index d4c299f..ed9b179 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs @@ -174,7 +174,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests TestHelpers.InMethod(); // log4net.Config.XmlConfigurator.Configure(); - UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001"); +// UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001"); TestScene myScene1 = SceneHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000); TestScene myScene2 = SceneHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000); -- cgit v1.1 From 09d6521361273e2ec4cabfd168d37781fc685785 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 4 Feb 2012 01:00:11 +0000 Subject: Correct RC_* LSL constants used by llCastRay(). Many thanks to WhiteStar for doing the research on this. --- .../Shared/Api/Runtime/LSL_Constants.cs | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index a69b4cb..da1ef91 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -621,20 +621,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const string URL_REQUEST_GRANTED = "URL_REQUEST_GRANTED"; public const string URL_REQUEST_DENIED = "URL_REQUEST_DENIED"; - public static readonly LSLInteger RC_REJECT_TYPES = 2; - public static readonly LSLInteger RC_DATA_FLAGS = 4; - public static readonly LSLInteger RC_MAX_HITS = 8; - public static readonly LSLInteger RC_DETECT_PHANTOM = 16; + public static readonly LSLInteger RC_REJECT_TYPES = 0; + public static readonly LSLInteger RC_DETECT_PHANTOM = 1; + public static readonly LSLInteger RC_DATA_FLAGS = 2; + public static readonly LSLInteger RC_MAX_HITS = 3; - public static readonly LSLInteger RC_REJECT_AGENTS = 2; - public static readonly LSLInteger RC_REJECT_PHYSICAL = 4; - public static readonly LSLInteger RC_REJECT_NONPHYSICAL = 8; - public static readonly LSLInteger RC_REJECT_LAND = 16; + public static readonly LSLInteger RC_REJECT_AGENTS = 1; + public static readonly LSLInteger RC_REJECT_PHYSICAL = 2; + public static readonly LSLInteger RC_REJECT_NONPHYSICAL = 4; + public static readonly LSLInteger RC_REJECT_LAND = 8; - public static readonly LSLInteger RC_GET_NORMAL = 2; - public static readonly LSLInteger RC_GET_ROOT_KEY = 4; - public static readonly LSLInteger RC_GET_LINK_NUM = 8; + public static readonly LSLInteger RC_GET_NORMAL = 1; + public static readonly LSLInteger RC_GET_ROOT_KEY = 2; + public static readonly LSLInteger RC_GET_LINK_NUM = 4; - public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = 1; + public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = 3; } } -- cgit v1.1 From edc11a1d3978a863f36bce3e65ff417f4a3d039f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 4 Feb 2012 01:04:00 +0000 Subject: Add missing RCERR_UNKNOWN and RCERR_SIM_PERF_LOW LSL constants that would eventually be used by llCastRay(), though OpenSim does not use these yet. --- OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index da1ef91..bb498b5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -635,6 +635,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public static readonly LSLInteger RC_GET_ROOT_KEY = 2; public static readonly LSLInteger RC_GET_LINK_NUM = 4; + public static readonly LSLInteger RCERR_UNKNOWN = -1; + public static readonly LSLInteger RCERR_SIM_PERF_LOW = -2; public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = 3; } } -- cgit v1.1