From b82b0b16770af89b0bbe48ba63a0d9fec9839d6d Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 1 Mar 2011 09:20:50 -0800
Subject: Normalizing comparison to lower case, just in case ppl set their
config vars inconsistently. (maybe related to mantis #5386)
---
OpenSim/Services/HypergridService/UserAgentService.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 3ead180..445d45e 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -253,7 +253,7 @@ namespace OpenSim.Services.HypergridService
TravelingAgentInfo travel = m_TravelingAgents[sessionID];
- return travel.GridExternalName == thisGridExternalName;
+ return travel.GridExternalName.ToLower() == thisGridExternalName.ToLower();
}
public bool VerifyClient(UUID sessionID, string reportedIP)
--
cgit v1.1
From 3c89527b222c2ddc50553ce1c49f22e9f05db11b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 5 Mar 2011 00:06:51 +0000
Subject: Fix bug where llSetPrimMediaParams() reported success but never set
the media texture.
We weren't setting the TextureEntryFace.MediaFlags = true when a media texture was set directly via a script. This was being done when the viewer was setting them directly.
---
.../Region/CoreModules/World/Media/Moap/MoapModule.cs | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
index 7c5d044..9132753 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
@@ -227,15 +227,24 @@ namespace OpenSim.Region.CoreModules.Media.Moap
public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me)
{
+// m_log.DebugFormat("[MOAP]: SetMediaEntry for {0}, face {1}", part.Name, face);
+
CheckFaceParam(part, face);
if (null == part.Shape.Media)
part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]);
-
+
lock (part.Shape.Media)
- part.Shape.Media[face] = me;
+ part.Shape.Media[face] = me;
UpdateMediaUrl(part, UUID.Zero);
+
+ // Temporary code to fix llSetPrimMediaParams() bug, pending refactoring
+ Primitive.TextureEntry te = part.Shape.Textures;
+ Primitive.TextureEntryFace teFace = te.CreateFace((uint)face);
+ teFace.MediaFlags = true;
+ part.Shape.Textures = te;
+
part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA);
}
@@ -333,7 +342,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
}
// m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId);
-
+//
// for (int i = 0; i < omu.FaceMedia.Length; i++)
// {
// MediaEntry me = omu.FaceMedia[i];
@@ -380,6 +389,8 @@ namespace OpenSim.Region.CoreModules.Media.Moap
}
else
{
+// m_log.DebugFormat("[MOAP]: Setting existing media list for {0}", part.Name);
+
// We need to go through the media textures one at a time to make sure that we have permission
// to change them
--
cgit v1.1
From 481ca910da47e68546623573ac9bba669d7b44c1 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 5 Mar 2011 01:07:05 +0000
Subject: add test for MoapModule.SetMediaUrl()
---
.../World/Media/Moap/Tests/MoapTests.cs | 72 ++++++++++++++++++++++
prebuild.xml | 1 +
2 files changed, 73 insertions(+)
create mode 100644 OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
new file mode 100644
index 0000000..d4c9245
--- /dev/null
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System.Threading;
+using log4net.Config;
+using NUnit.Framework;
+using NUnit.Framework.SyntaxHelpers;
+using OpenMetaverse;
+using OpenMetaverse.Assets;
+using OpenSim.Framework;
+using OpenSim.Region.CoreModules.Media.Moap;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.Framework.Scenes.Serialization;
+using OpenSim.Tests.Common;
+using OpenSim.Tests.Common.Mock;
+using OpenSim.Tests.Common.Setup;
+
+namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests
+{
+ [TestFixture]
+ public class MoapTests
+ {
+ [Test]
+ public void TestSetMediaUrl()
+ {
+ TestHelper.InMethod();
+
+ string homeUrl = "opensimulator.org";
+
+ MoapModule module = new MoapModule();
+ TestScene scene = SceneSetupHelpers.SetupScene();
+ SceneSetupHelpers.SetupSceneModules(scene, module);
+
+ SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene);
+ MediaEntry me = new MediaEntry() { HomeURL = homeUrl };
+
+ module.SetMediaEntry(part, 1, me);
+
+ Assert.That(part.Shape.Media[1].HomeURL, Is.EqualTo(homeUrl));
+ Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000000/" + UUID.Zero));
+ Assert.That(part.Shape.Textures.FaceTextures[1].MediaFlags, Is.True);
+ }
+ }
+}
\ No newline at end of file
diff --git a/prebuild.xml b/prebuild.xml
index cbe539e..b31812d 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -2927,6 +2927,7 @@
+
--
cgit v1.1
From 72cb498fd0c167867d71c26e55afedc2e23ab9b4 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 5 Mar 2011 01:13:59 +0000
Subject: minor: Make MoapModule namespace consistent with other modules
---
OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | 2 +-
OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
index 9132753..b6ec6dc 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
@@ -50,7 +50,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps;
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
-namespace OpenSim.Region.CoreModules.Media.Moap
+namespace OpenSim.Region.CoreModules.World.Media.Moap
{
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")]
public class MoapModule : INonSharedRegionModule, IMoapModule
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
index d4c9245..9e5c7ae 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
@@ -36,7 +36,7 @@ using NUnit.Framework.SyntaxHelpers;
using OpenMetaverse;
using OpenMetaverse.Assets;
using OpenSim.Framework;
-using OpenSim.Region.CoreModules.Media.Moap;
+using OpenSim.Region.CoreModules.World.Media.Moap;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Scenes.Serialization;
using OpenSim.Tests.Common;
--
cgit v1.1
From 8efb01b3df1ea98d5e4a68aa220bafc4ab5306f4 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 5 Mar 2011 01:15:27 +0000
Subject: minor: remove some mono compiler warnings
---
.../OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +-
.../Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 12 ++++++------
.../XmlRpcGroups/SimianGroupsServicesConnectorModule.cs | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index dfeecb1..6a24cc1 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")]
public class LindenUDPInfoModule : ISharedRegionModule
{
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected Dictionary m_scenes = new Dictionary();
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
index e9c5453..05a1c3b 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
private static string m_freeSwitchUrlResetPassword;
private uint m_freeSwitchServicePort;
private string m_openSimWellKnownHTTPAddress;
- private string m_freeSwitchContext;
+// private string m_freeSwitchContext;
private readonly Dictionary m_UUIDName = new Dictionary();
private Dictionary m_ParcelAddress = new Dictionary();
@@ -144,7 +144,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
m_freeSwitchDefaultWellKnownIP = map["DefaultWellKnownIP"].AsString();
m_freeSwitchDefaultTimeout = map["DefaultTimeout"].AsInteger();
m_freeSwitchUrlResetPassword = String.Empty;
- m_freeSwitchContext = map["Context"].AsString();
+// m_freeSwitchContext = map["Context"].AsString();
if (String.IsNullOrEmpty(m_freeSwitchRealm) ||
String.IsNullOrEmpty(m_freeSwitchAPIPrefix))
@@ -662,7 +662,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
resp.Append("