From 5181bdae0a3c867ca26900bd3309b7ea56538147 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Fri, 3 Aug 2012 12:21:57 +0100 Subject: attempting to fix a build issue Signed-off-by: BlueWall --- .../Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index d039111..6b9f537 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -596,9 +596,9 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender } break; case "R": - Font newFont = new Font(myFont, FontStyle.Regular); +// Font newFont = new Font(myFont, FontStyle.Regular); myFont.Dispose(); - myFont = newFont; + myFont = new Font(myFont, FontStyle.Regular); break; } } -- cgit v1.1 From faffe2f2f9beda067d2e7bb68918c43bb55ef595 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 3 Aug 2012 22:03:04 +0100 Subject: Fix the recent windows compile error by putting newFont for case "R" in VectorRenderModule inside its own context, rather than disposing of the old font before using it as a prototype for the new. --- .../CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index 6b9f537..ca320e1 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -596,9 +596,14 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender } break; case "R": -// Font newFont = new Font(myFont, FontStyle.Regular); - myFont.Dispose(); - myFont = new Font(myFont, FontStyle.Regular); + // We need to place this newFont inside its own context so that the .NET compiler + // doesn't complain about a redefinition of an existing newFont, even though there is none + // The mono compiler doesn't produce this error. + { + Font newFont = new Font(myFont, FontStyle.Regular); + myFont.Dispose(); + myFont = newFont; + } break; } } -- cgit v1.1 From 0e3b08fa5bca2200e18dac7a3d1d72d5f4d7bf64 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 3 Aug 2012 23:09:47 +0100 Subject: Update settings loading in AvatarFactoryModule which should have been in last commit 205f2326 --- .../CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 68a4cde..47d5c97 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -66,11 +66,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory scene.RegisterModuleInterface(this); scene.EventManager.OnNewClient += SubscribeToClientEvents; - IConfig sconfig = config.Configs["Startup"]; - if (sconfig != null) + IConfig appearanceConfig = appearanceConfig.Configs["Appearance"]; + if (appearanceConfig != null) { - m_savetime = Convert.ToInt32(sconfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime))); - m_sendtime = Convert.ToInt32(sconfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime))); + m_savetime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime))); + m_sendtime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime))); // m_log.InfoFormat("[AVFACTORY] configured for {0} save and {1} send",m_savetime,m_sendtime); } -- cgit v1.1 From 2724cf685e5e15c6c7f5c04c1609faa37c5db84e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 3 Aug 2012 23:13:19 +0100 Subject: Fix build break. --- OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 47d5c97..1d6e522 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory scene.RegisterModuleInterface(this); scene.EventManager.OnNewClient += SubscribeToClientEvents; - IConfig appearanceConfig = appearanceConfig.Configs["Appearance"]; + IConfig appearanceConfig = config.Configs["Appearance"]; if (appearanceConfig != null) { m_savetime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime))); -- cgit v1.1 From fb91ca6f1d3e61444005175d0a0d55025d15ad5b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 3 Aug 2012 23:49:34 +0100 Subject: Fix old regression that stopped saving parcel owner data in OARs. This was working in 0.7.2 but was accidentally removed from 0.7.3. The --publish option for "save oar" will now save oars stripped of parcel owner information as well as scene object info. Please use the --publish option if you want to publish oars that may be later loaded by others to the same grid from which they were saved. --- .../Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index c179a34..0780d86 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs @@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver LandData landData = lo.LandData; string landDataPath = String.Format("{0}{1}.xml", ArchiveConstants.LANDDATA_PATH, landData.GlobalID.ToString()); - m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData)); + m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData, m_options)); } m_log.InfoFormat("[ARCHIVER]: Adding terrain information to archive."); -- cgit v1.1 From fe4c3a37c0a4d41c410ef99003c7ab437bdbc5f0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 14 Aug 2012 00:12:15 +0100 Subject: Lay some groundwork for temp attachments. Decouple attachments from inventory. --- .../Avatar/Attachments/AttachmentsModule.cs | 41 ++++++++++++++-------- .../Attachments/Tests/AttachmentsModuleTests.cs | 6 ++-- 2 files changed, 30 insertions(+), 17 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 464dfd3..77dd0f0 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -239,7 +239,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments sp.ClearAttachments(); } - public bool AttachObject(IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool silent) + public bool AttachObject(IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool silent, bool temp) { lock (sp.AttachmentsSyncLock) { @@ -298,7 +298,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments group.AbsolutePosition = attachPos; if (sp.PresenceType != PresenceType.Npc) - UpdateUserInventoryWithAttachment(sp, group, attachmentPt); + UpdateUserInventoryWithAttachment(sp, group, attachmentPt, temp); AttachToAgent(sp, group, attachmentPt, attachPos, silent); } @@ -306,7 +306,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments return true; } - private void UpdateUserInventoryWithAttachment(IScenePresence sp, SceneObjectGroup group, uint attachmentPt) + private void UpdateUserInventoryWithAttachment(IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool temp) { // Remove any previous attachments List attachments = sp.GetAttachments(attachmentPt); @@ -316,18 +316,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments { if (attachments[0].FromItemID != UUID.Zero) DetachSingleAttachmentToInvInternal(sp, attachments[0]); - else - m_log.WarnFormat( - "[ATTACHMENTS MODULE]: When detaching existing attachment {0} {1} at point {2} to make way for {3} {4} for {5}, couldn't find the associated item ID to adjust inventory attachment record!", - attachments[0].Name, attachments[0].LocalId, attachmentPt, group.Name, group.LocalId, sp.Name); + // Error logging commented because UUID.Zero now means temp attachment +// else +// m_log.WarnFormat( +// "[ATTACHMENTS MODULE]: When detaching existing attachment {0} {1} at point {2} to make way for {3} {4} for {5}, couldn't find the associated item ID to adjust inventory attachment record!", +// attachments[0].Name, attachments[0].LocalId, attachmentPt, group.Name, group.LocalId, sp.Name); } // Add the new attachment to inventory if we don't already have it. - UUID newAttachmentItemID = group.FromItemID; - if (newAttachmentItemID == UUID.Zero) - newAttachmentItemID = AddSceneObjectAsNewAttachmentInInv(sp, group).ID; + if (!temp) + { + UUID newAttachmentItemID = group.FromItemID; + if (newAttachmentItemID == UUID.Zero) + newAttachmentItemID = AddSceneObjectAsNewAttachmentInInv(sp, group).ID; - ShowAttachInUserInventory(sp, attachmentPt, newAttachmentItemID, group); + ShowAttachInUserInventory(sp, attachmentPt, newAttachmentItemID, group); + } } public SceneObjectGroup RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt) @@ -416,7 +420,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments so.PrimCount, sp.UUID, sp.AbsolutePosition)) return; - bool changed = sp.Appearance.DetachAttachment(inventoryID); + bool changed = false; + if (inventoryID != UUID.Zero) + changed = sp.Appearance.DetachAttachment(inventoryID); if (changed && m_scene.AvatarFactory != null) m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID); @@ -521,6 +527,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments /// private void UpdateKnownItem(IScenePresence sp, SceneObjectGroup grp, string scriptedState) { + if (grp.FromItemID == UUID.Zero) + { + // We can't save temp attachments + grp.HasGroupChanged = false; + return; + } + // Saving attachments for NPCs messes them up for the real owner! INPCModule module = m_scene.RequestModuleInterface(); if (module != null) @@ -777,7 +790,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments // This will throw if the attachment fails try { - AttachObject(sp, objatt, attachmentPt, false); + AttachObject(sp, objatt, attachmentPt, false, false); } catch (Exception e) { @@ -931,7 +944,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments AttachmentPt &= 0x7f; // Calls attach with a Zero position - if (AttachObject(sp, part.ParentGroup, AttachmentPt, false)) + if (AttachObject(sp, part.ParentGroup, AttachmentPt, false, false)) { // m_log.Debug( // "[ATTACHMENTS MODULE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 6e7a414..1d13f75 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs @@ -189,7 +189,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, attName, sp.UUID); - scene.AttachmentsModule.AttachObject(sp, so, (uint)AttachmentPoint.Chest, false); + scene.AttachmentsModule.AttachObject(sp, so, (uint)AttachmentPoint.Chest, false, false); // Check status on scene presence Assert.That(sp.HasAttachments(), Is.True); @@ -243,7 +243,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests sp2.AbsolutePosition = new Vector3(0, 0, 0); sp2.HandleAgentRequestSit(sp2.ControllingClient, sp2.UUID, so.UUID, Vector3.Zero); - scene.AttachmentsModule.AttachObject(sp, so, (uint)AttachmentPoint.Chest, false); + scene.AttachmentsModule.AttachObject(sp, so, (uint)AttachmentPoint.Chest, false, false); Assert.That(sp.HasAttachments(), Is.False); Assert.That(scene.GetSceneObjectGroups().Count, Is.EqualTo(1)); @@ -641,4 +641,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests // Assert.That(presence.HasAttachments(), Is.True, "Presence has not received new objects"); // } } -} \ No newline at end of file +} -- cgit v1.1 From 9bd2c1b88add5d6cc529a6882a7067200cb78ecb Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 14 Aug 2012 01:12:27 +0100 Subject: As per lindn spec, disable detach and drop for temp attachments --- .../Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 77dd0f0..f107be1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -410,6 +410,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments UUID inventoryID = so.FromItemID; + // As per Linden spec, drop is disabled for temp attachs + if (inventoryID == UUID.Zero) + return; + // m_log.DebugFormat( // "[ATTACHMENTS MODULE]: In DetachSingleAttachmentToGround(), object is {0} {1}, associated item is {2}", // so.Name, so.LocalId, inventoryID); @@ -454,6 +458,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments public void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup so) { + // As per Linden spec, detach (take) is disabled for temp attachs + if (so.FromItemID == UUID.Zero) + return; + lock (sp.AttachmentsSyncLock) { // Save avatar attachment information -- cgit v1.1 From c313de630f2fec6793da2bc1f51dd54be82cb3e8 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 15 Aug 2012 23:31:38 +0200 Subject: Add a real_id field to the login response if impersonation is used. The wrapper script needs this for proper logging. --- .../Authentication/LocalAuthenticationServiceConnector.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs index 9484a5a..25ee4c6 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs @@ -137,6 +137,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authentication #region IAuthenticationService + public string Authenticate(UUID principalID, string password, int lifetime, out UUID realID) + { + // Not implemented at the regions + return string.Empty; + } + public string Authenticate(UUID principalID, string password, int lifetime) { // Not implemented at the regions -- cgit v1.1