Merge branch 'master' into careminster

Conflicts:
	OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
	OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
avinationmerge
Melanie 2012-11-25 14:13:50 +00:00
commit fd7a83f439
89 changed files with 974 additions and 644 deletions

View File

@ -43,7 +43,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Capabilities.Handlers.GetTexture.Tests namespace OpenSim.Capabilities.Handlers.GetTexture.Tests
{ {
[TestFixture] [TestFixture]
public class GetTextureHandlerTests public class GetTextureHandlerTests : OpenSimTestCase
{ {
[Test] [Test]
public void TestTextureNotFound() public void TestTextureNotFound()

View File

@ -0,0 +1,71 @@
/*
* 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 OpenMetaverse;
using OpenSim.Framework;
namespace OpenSim.Data
{
public class XGroup
{
public UUID groupID;
public UUID ownerRoleID;
public string name;
public string charter;
public bool showInList;
public UUID insigniaID;
public int membershipFee;
public bool openEnrollment;
public bool allowPublish;
public bool maturePublish;
public UUID founderID;
public ulong everyonePowers;
public ulong ownersPowers;
public XGroup Clone()
{
return (XGroup)MemberwiseClone();
}
}
/// <summary>
/// Early stub interface for groups data, not final.
/// </summary>
/// <remarks>
/// Currently in-use only for regression test purposes. Needs to be filled out over time.
/// </remarks>
public interface IXGroupData
{
bool StoreGroup(XGroup group);
XGroup[] GetGroups(string field, string val);
XGroup[] GetGroups(string[] fields, string[] vals);
bool DeleteGroups(string field, string val);
bool DeleteGroups(string[] fields, string[] vals);
}
}

View File

@ -0,0 +1,67 @@
/*
* 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.Linq;
using System.Reflection;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
namespace OpenSim.Data.Null
{
/// <summary>
/// Not a proper generic data handler yet - probably needs to actually store the data as well instead of relying
/// on descendent classes
/// </summary>
public class NullGenericDataHandler
{
protected List<T> Get<T>(string[] fields, string[] vals, List<T> inputEntities)
{
List<T> entities = inputEntities;
for (int i = 0; i < fields.Length; i++)
{
entities
= entities.Where(
e =>
{
FieldInfo fi = typeof(T).GetField(fields[i]);
if (fi == null)
throw new NotImplementedException(string.Format("No field {0} for val {1}", fields[i], vals[i]));
return fi.GetValue(e).ToString() == vals[i];
}
).ToList();
}
return entities;
}
}
}

View File

@ -0,0 +1,90 @@
/*
* 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;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
namespace OpenSim.Data.Null
{
public class NullXGroupData : NullGenericDataHandler, IXGroupData
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Dictionary<UUID, XGroup> m_groups = new Dictionary<UUID, XGroup>();
public NullXGroupData(string connectionString, string realm) {}
public bool StoreGroup(XGroup group)
{
lock (m_groups)
{
m_groups[group.groupID] = group.Clone();
}
return true;
}
public XGroup[] GetGroups(string field, string val)
{
return GetGroups(new string[] { field }, new string[] { val });
}
public XGroup[] GetGroups(string[] fields, string[] vals)
{
lock (m_groups)
{
List<XGroup> origGroups = Get<XGroup>(fields, vals, m_groups.Values.ToList());
return origGroups.Select(g => g.Clone()).ToArray();
}
}
public bool DeleteGroups(string field, string val)
{
return DeleteGroups(new string[] { field }, new string[] { val });
}
public bool DeleteGroups(string[] fields, string[] vals)
{
lock (m_groups)
{
XGroup[] groupsToDelete = GetGroups(fields, vals);
Array.ForEach(groupsToDelete, g => m_groups.Remove(g.groupID));
}
return true;
}
}
}

View File

@ -33,6 +33,7 @@ using NUnit.Framework;
using NUnit.Framework.Constraints; using NUnit.Framework.Constraints;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Tests.Common;
using log4net; using log4net;
using System.Data; using System.Data;
using System.Data.Common; using System.Data.Common;
@ -45,7 +46,7 @@ namespace OpenSim.Data.Tests
/// </summary> /// </summary>
/// <typeparam name="TConn"></typeparam> /// <typeparam name="TConn"></typeparam>
/// <typeparam name="TService"></typeparam> /// <typeparam name="TService"></typeparam>
public class BasicDataServiceTest<TConn, TService> public class BasicDataServiceTest<TConn, TService> : OpenSimTestCase
where TConn : DbConnection, new() where TConn : DbConnection, new()
where TService : class, new() where TService : class, new()
{ {

View File

@ -36,6 +36,7 @@ using NUnit.Framework;
using NUnit.Framework.Constraints; using NUnit.Framework.Constraints;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Tests.Common;
namespace OpenSim.Data.Tests namespace OpenSim.Data.Tests
{ {
@ -254,7 +255,7 @@ namespace OpenSim.Data.Tests
} }
[TestFixture] [TestFixture]
public class PropertyCompareConstraintTest public class PropertyCompareConstraintTest : OpenSimTestCase
{ {
public class HasInt public class HasInt
{ {

View File

@ -34,6 +34,7 @@ using System.Text;
using NUnit.Framework; using NUnit.Framework;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Tests.Common;
namespace OpenSim.Data.Tests namespace OpenSim.Data.Tests
{ {
@ -158,7 +159,7 @@ namespace OpenSim.Data.Tests
} }
[TestFixture] [TestFixture]
public class PropertyScramblerTests public class PropertyScramblerTests : OpenSimTestCase
{ {
[Test] [Test]
public void TestScramble() public void TestScramble()

View File

@ -154,6 +154,11 @@ namespace OpenSim.Framework.Serialization
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "trashfolder.txt"] = (sbyte)AssetType.TrashFolder; EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "trashfolder.txt"] = (sbyte)AssetType.TrashFolder;
} }
public static string CreateOarLandDataPath(LandData ld)
{
return string.Format("{0}{1}.xml", ArchiveConstants.LANDDATA_PATH, ld.GlobalID);
}
/// <summary> /// <summary>
/// Create the filename used to store an object in an OpenSim Archive. /// Create the filename used to store an object in an OpenSim Archive.
/// </summary> /// </summary>

View File

@ -37,7 +37,7 @@ using OpenSim.Tests.Common;
namespace OpenSim.Framework.Serialization.Tests namespace OpenSim.Framework.Serialization.Tests
{ {
[TestFixture] [TestFixture]
public class LandDataSerializerTest public class LandDataSerializerTest : OpenSimTestCase
{ {
private LandData land; private LandData land;
private LandData landWithParcelAccessList; private LandData landWithParcelAccessList;

View File

@ -37,7 +37,7 @@ using OpenSim.Tests.Common;
namespace OpenSim.Framework.Serialization.Tests namespace OpenSim.Framework.Serialization.Tests
{ {
[TestFixture] [TestFixture]
public class RegionSettingsSerializerTests public class RegionSettingsSerializerTests : OpenSimTestCase
{ {
private string m_serializedRs = @"<?xml version=""1.0"" encoding=""utf-16""?> private string m_serializedRs = @"<?xml version=""1.0"" encoding=""utf-16""?>
<RegionSettings> <RegionSettings>

View File

@ -27,7 +27,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
@ -99,34 +98,6 @@ namespace OpenSim.Framework.Servers
m_console.Commands.AddCommand("General", false, "shutdown", m_console.Commands.AddCommand("General", false, "shutdown",
"shutdown", "shutdown",
"Quit the application", HandleQuit); "Quit the application", HandleQuit);
m_console.Commands.AddCommand("General", false, "show threads",
"show threads",
"Show thread status", HandleShow);
m_console.Commands.AddCommand("General", false, "show version",
"show version",
"Show server version", HandleShow);
m_console.Commands.AddCommand("General", false, "threads abort",
"threads abort <thread-id>",
"Abort a managed thread. Use \"show threads\" to find possible threads.", HandleThreadsAbort);
m_console.Commands.AddCommand("General", false, "threads show",
"threads show",
"Show thread status. Synonym for \"show threads\"",
(string module, string[] args) => Notice(GetThreadsReport()));
m_console.Commands.AddCommand("General", false, "force gc",
"force gc",
"Manually invoke runtime garbage collection. For debugging purposes",
HandleForceGc);
}
private void HandleForceGc(string module, string[] args)
{
MainConsole.Instance.Output("Manually invoking runtime garbage collection");
GC.Collect();
} }
/// <summary> /// <summary>
@ -158,54 +129,6 @@ namespace OpenSim.Framework.Servers
m_log.Debug(sb); m_log.Debug(sb);
} }
/// <summary>
/// Get a report about the registered threads in this server.
/// </summary>
protected string GetThreadsReport()
{
// This should be a constant field.
string reportFormat = "{0,6} {1,35} {2,16} {3,13} {4,10} {5,30}";
StringBuilder sb = new StringBuilder();
Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreadsInfo();
sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine);
int timeNow = Environment.TickCount & Int32.MaxValue;
sb.AppendFormat(reportFormat, "ID", "NAME", "LAST UPDATE (MS)", "LIFETIME (MS)", "PRIORITY", "STATE");
sb.Append(Environment.NewLine);
foreach (Watchdog.ThreadWatchdogInfo twi in threads)
{
Thread t = twi.Thread;
sb.AppendFormat(
reportFormat,
t.ManagedThreadId,
t.Name,
timeNow - twi.LastTick,
timeNow - twi.FirstTick,
t.Priority,
t.ThreadState);
sb.Append("\n");
}
sb.Append("\n");
// For some reason mono 2.6.7 returns an empty threads set! Not going to confuse people by reporting
// zero active threads.
int totalThreads = Process.GetCurrentProcess().Threads.Count;
if (totalThreads > 0)
sb.AppendFormat("Total threads active: {0}\n\n", totalThreads);
sb.Append("Main threadpool (excluding script engine pools)\n");
sb.Append(Util.GetThreadPoolReport());
return sb.ToString();
}
/// <summary> /// <summary>
/// Performs initialisation of the scene, such as loading configuration from disk. /// Performs initialisation of the scene, such as loading configuration from disk.
/// </summary> /// </summary>
@ -248,49 +171,6 @@ namespace OpenSim.Framework.Servers
Shutdown(); Shutdown();
} }
public override void HandleShow(string module, string[] cmd)
{
base.HandleShow(module, cmd);
List<string> args = new List<string>(cmd);
args.RemoveAt(0);
string[] showParams = args.ToArray();
switch (showParams[0])
{
case "threads":
Notice(GetThreadsReport());
break;
case "version":
Notice(GetVersionText());
break;
}
}
public virtual void HandleThreadsAbort(string module, string[] cmd)
{
if (cmd.Length != 3)
{
MainConsole.Instance.Output("Usage: threads abort <thread-id>");
return;
}
int threadId;
if (!int.TryParse(cmd[2], out threadId))
{
MainConsole.Instance.Output("ERROR: Thread id must be an integer");
return;
}
if (Watchdog.AbortThread(threadId))
MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId);
else
MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId);
}
public string osSecret { public string osSecret {
// Secret uuid for the simulator // Secret uuid for the simulator
get { return m_osSecret; } get { return m_osSecret; }

View File

@ -1283,59 +1283,6 @@ namespace OpenSim.Framework.Servers.HttpServer
map["login"] = OSD.FromString("false"); map["login"] = OSD.FromString("false");
return map; return map;
} }
/// <summary>
/// A specific agent handler was provided. Such a handler is expecetd to have an
/// intimate, and highly specific relationship with the client. Consequently,
/// nothing is done here.
/// </summary>
/// <param name="handler"></param>
/// <param name="request"></param>
/// <param name="response"></param>
private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request, OSHttpResponse response)
{
// In the case of REST, then handler is responsible for ALL aspects of
// the request/response handling. Nothing is done here, not even encoding.
try
{
return handler.Handle(request, response);
}
catch (Exception e)
{
// If the handler did in fact close the stream, then this will blow
// chunks. So that that doesn't disturb anybody we throw away any
// and all exceptions raised. We've done our best to release the
// client.
try
{
m_log.Warn("[HTTP-AGENT]: Error - " + e.Message);
response.SendChunked = false;
response.KeepAlive = true;
response.StatusCode = (int)OSHttpStatusCode.ServerErrorInternalError;
//response.OutputStream.Close();
try
{
response.Send();
//response.FreeContext();
}
catch (SocketException f)
{
// This has to be here to prevent a Linux/Mono crash
m_log.Warn(
String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux. ", f.Message), f);
}
}
catch(Exception)
{
}
}
// Indicate that the request has been "handled"
return true;
}
public byte[] HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) public byte[] HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response)
{ {

View File

@ -27,16 +27,19 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading;
using log4net; using log4net;
using log4net.Appender; using log4net.Appender;
using log4net.Core; using log4net.Core;
using log4net.Repository; using log4net.Repository;
using Nini.Config; using Nini.Config;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Monitoring;
namespace OpenSim.Framework.Servers namespace OpenSim.Framework.Servers
{ {
@ -167,6 +170,9 @@ namespace OpenSim.Framework.Servers
m_console.Commands.AddCommand( m_console.Commands.AddCommand(
"General", false, "show info", "show info", "Show general information about the server", HandleShow); "General", false, "show info", "show info", "Show general information about the server", HandleShow);
m_console.Commands.AddCommand(
"General", false, "show version", "show version", "Show server version", HandleShow);
m_console.Commands.AddCommand( m_console.Commands.AddCommand(
"General", false, "show uptime", "show uptime", "Show server uptime", HandleShow); "General", false, "show uptime", "show uptime", "Show server uptime", HandleShow);
@ -206,6 +212,34 @@ namespace OpenSim.Framework.Servers
"General", false, "command-script", "General", false, "command-script",
"command-script <script>", "command-script <script>",
"Run a command script from file", HandleScript); "Run a command script from file", HandleScript);
m_console.Commands.AddCommand(
"General", false, "show threads",
"show threads",
"Show thread status", HandleShow);
m_console.Commands.AddCommand(
"General", false, "threads abort",
"threads abort <thread-id>",
"Abort a managed thread. Use \"show threads\" to find possible threads.", HandleThreadsAbort);
m_console.Commands.AddCommand(
"General", false, "threads show",
"threads show",
"Show thread status. Synonym for \"show threads\"",
(string module, string[] args) => Notice(GetThreadsReport()));
m_console.Commands.AddCommand(
"General", false, "force gc",
"force gc",
"Manually invoke runtime garbage collection. For debugging purposes",
HandleForceGc);
}
private void HandleForceGc(string module, string[] args)
{
Notice("Manually invoking runtime garbage collection");
GC.Collect();
} }
public virtual void HandleShow(string module, string[] cmd) public virtual void HandleShow(string module, string[] cmd)
@ -222,9 +256,17 @@ namespace OpenSim.Framework.Servers
ShowInfo(); ShowInfo();
break; break;
case "version":
Notice(GetVersionText());
break;
case "uptime": case "uptime":
Notice(GetUptimeReport()); Notice(GetUptimeReport());
break; break;
case "threads":
Notice(GetThreadsReport());
break;
} }
} }
@ -536,6 +578,75 @@ namespace OpenSim.Framework.Servers
return String.Format("Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion); return String.Format("Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion);
} }
/// <summary>
/// Get a report about the registered threads in this server.
/// </summary>
protected string GetThreadsReport()
{
// This should be a constant field.
string reportFormat = "{0,6} {1,35} {2,16} {3,13} {4,10} {5,30}";
StringBuilder sb = new StringBuilder();
Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreadsInfo();
sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine);
int timeNow = Environment.TickCount & Int32.MaxValue;
sb.AppendFormat(reportFormat, "ID", "NAME", "LAST UPDATE (MS)", "LIFETIME (MS)", "PRIORITY", "STATE");
sb.Append(Environment.NewLine);
foreach (Watchdog.ThreadWatchdogInfo twi in threads)
{
Thread t = twi.Thread;
sb.AppendFormat(
reportFormat,
t.ManagedThreadId,
t.Name,
timeNow - twi.LastTick,
timeNow - twi.FirstTick,
t.Priority,
t.ThreadState);
sb.Append("\n");
}
sb.Append("\n");
// For some reason mono 2.6.7 returns an empty threads set! Not going to confuse people by reporting
// zero active threads.
int totalThreads = Process.GetCurrentProcess().Threads.Count;
if (totalThreads > 0)
sb.AppendFormat("Total threads active: {0}\n\n", totalThreads);
sb.Append("Main threadpool (excluding script engine pools)\n");
sb.Append(Util.GetThreadPoolReport());
return sb.ToString();
}
public virtual void HandleThreadsAbort(string module, string[] cmd)
{
if (cmd.Length != 3)
{
MainConsole.Instance.Output("Usage: threads abort <thread-id>");
return;
}
int threadId;
if (!int.TryParse(cmd[2], out threadId))
{
MainConsole.Instance.Output("ERROR: Thread id must be an integer");
return;
}
if (Watchdog.AbortThread(threadId))
MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId);
else
MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId);
}
/// <summary> /// <summary>
/// Console output is only possible if a console has been established. /// Console output is only possible if a console has been established.
/// That is something that cannot be determined within this class. So /// That is something that cannot be determined within this class. So

View File

@ -35,11 +35,12 @@ using HttpServer;
using HttpServer.FormDecoders; using HttpServer.FormDecoders;
using NUnit.Framework; using NUnit.Framework;
using OpenSim.Framework.Servers.HttpServer; using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Tests.Common;
namespace OpenSim.Framework.Servers.Tests namespace OpenSim.Framework.Servers.Tests
{ {
[TestFixture] [TestFixture]
public class OSHttpTests public class OSHttpTests : OpenSimTestCase
{ {
// we need an IHttpClientContext for our tests // we need an IHttpClientContext for our tests
public class TestHttpClientContext: IHttpClientContext public class TestHttpClientContext: IHttpClientContext

View File

@ -29,11 +29,12 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using NUnit.Framework; using NUnit.Framework;
using OpenSim.Tests.Common;
namespace OpenSim.Framework.Servers.Tests namespace OpenSim.Framework.Servers.Tests
{ {
[TestFixture] [TestFixture]
public class VersionInfoTests public class VersionInfoTests : OpenSimTestCase
{ {
[Test] [Test]
public void TestVersionLength() public void TestVersionLength()

View File

@ -24,16 +24,17 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using System.Collections.Generic; using System.Collections.Generic;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.StructuredData; using OpenMetaverse.StructuredData;
using NUnit.Framework; using NUnit.Framework;
using OpenSim.Tests.Common;
namespace OpenSim.Framework.Tests namespace OpenSim.Framework.Tests
{ {
[TestFixture] [TestFixture]
public class AgentCircuitDataTest public class AgentCircuitDataTest : OpenSimTestCase
{ {
private UUID AgentId; private UUID AgentId;
private AvatarAppearance AvAppearance; private AvatarAppearance AvAppearance;

View File

@ -38,7 +38,7 @@ using Animation = OpenSim.Framework.Animation;
namespace OpenSim.Framework.Tests namespace OpenSim.Framework.Tests
{ {
[TestFixture] [TestFixture]
public class AnimationTests public class AnimationTests : OpenSimTestCase
{ {
private Animation anim1 = null; private Animation anim1 = null;
private Animation anim2 = null; private Animation anim2 = null;

View File

@ -30,11 +30,12 @@ using System.Collections.Generic;
using System.Text; using System.Text;
using NUnit.Framework; using NUnit.Framework;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Tests.Common;
namespace OpenSim.Framework.Tests namespace OpenSim.Framework.Tests
{ {
[TestFixture] [TestFixture]
public class AssetBaseTest public class AssetBaseTest : OpenSimTestCase
{ {
[Test] [Test]
public void TestContainsReferences() public void TestContainsReferences()

View File

@ -28,11 +28,12 @@
using System; using System;
using NUnit.Framework; using NUnit.Framework;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Tests.Common;
namespace OpenSim.Framework.Tests namespace OpenSim.Framework.Tests
{ {
[TestFixture] [TestFixture]
public class CacheTests public class CacheTests : OpenSimTestCase
{ {
private Cache cache; private Cache cache;
private UUID cacheItemUUID; private UUID cacheItemUUID;

View File

@ -26,11 +26,12 @@
*/ */
using NUnit.Framework; using NUnit.Framework;
using OpenSim.Tests.Common;
namespace OpenSim.Framework.Tests namespace OpenSim.Framework.Tests
{ {
[TestFixture] [TestFixture]
public class LocationTest public class LocationTest : OpenSimTestCase
{ {
[Test] [Test]
public void locationRegionHandleRegionHandle() public void locationRegionHandleRegionHandle()

View File

@ -32,11 +32,12 @@ using OpenMetaverse.StructuredData;
using System; using System;
using System.Globalization; using System.Globalization;
using System.Threading; using System.Threading;
using OpenSim.Tests.Common;
namespace OpenSim.Framework.Tests namespace OpenSim.Framework.Tests
{ {
[TestFixture] [TestFixture]
public class MundaneFrameworkTests public class MundaneFrameworkTests : OpenSimTestCase
{ {
private bool m_RegionSettingsOnSaveEventFired; private bool m_RegionSettingsOnSaveEventFired;
private bool m_RegionLightShareDataOnSaveEventFired; private bool m_RegionLightShareDataOnSaveEventFired;

View File

@ -31,11 +31,12 @@ using NUnit.Framework;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.StructuredData; using OpenMetaverse.StructuredData;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Tests.Common;
namespace OpenSim.Framework.Tests namespace OpenSim.Framework.Tests
{ {
[TestFixture] [TestFixture]
public class PrimeNumberHelperTests public class PrimeNumberHelperTests : OpenSimTestCase
{ {
[Test] [Test]
public void TestGetPrime() public void TestGetPrime()

View File

@ -33,7 +33,7 @@ using OpenSim.Tests.Common;
namespace OpenSim.Framework.Tests namespace OpenSim.Framework.Tests
{ {
[TestFixture] [TestFixture]
public class UtilTests public class UtilTests : OpenSimTestCase
{ {
[Test] [Test]
public void VectorOperationTests() public void VectorOperationTests()

View File

@ -1752,6 +1752,9 @@ namespace OpenSim.Framework
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
if (FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) if (FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool)
{
// ROBUST currently leaves this the FireAndForgetMethod but never actually initializes the threadpool.
if (m_ThreadPool != null)
{ {
threadPoolUsed = "SmartThreadPool"; threadPoolUsed = "SmartThreadPool";
maxThreads = m_ThreadPool.MaxThreads; maxThreads = m_ThreadPool.MaxThreads;
@ -1760,6 +1763,7 @@ namespace OpenSim.Framework
allocatedThreads = m_ThreadPool.ActiveThreads; allocatedThreads = m_ThreadPool.ActiveThreads;
waitingCallbacks = m_ThreadPool.WaitingCallbacks; waitingCallbacks = m_ThreadPool.WaitingCallbacks;
} }
}
else if ( else if (
FireAndForgetMethod == FireAndForgetMethod.UnsafeQueueUserWorkItem FireAndForgetMethod == FireAndForgetMethod.UnsafeQueueUserWorkItem
|| FireAndForgetMethod == FireAndForgetMethod.UnsafeQueueUserWorkItem) || FireAndForgetMethod == FireAndForgetMethod.UnsafeQueueUserWorkItem)

View File

@ -44,7 +44,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.ClientStack.Linden.Tests namespace OpenSim.Region.ClientStack.Linden.Tests
{ {
[TestFixture] [TestFixture]
public class EventQueueTests public class EventQueueTests : OpenSimTestCase
{ {
private TestScene m_scene; private TestScene m_scene;

View File

@ -43,7 +43,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.ClientStack.LindenUDP.Tests namespace OpenSim.Region.ClientStack.LindenUDP.Tests
{ {
[TestFixture] [TestFixture]
public class LLImageManagerTests public class LLImageManagerTests : OpenSimTestCase
{ {
private AssetBase m_testImageAsset; private AssetBase m_testImageAsset;
private Scene scene; private Scene scene;

View File

@ -39,7 +39,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
/// Tests for the LL packet handler /// Tests for the LL packet handler
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class PacketHandlerTests public class PacketHandlerTests : OpenSimTestCase
{ {
// [Test] // [Test]
// /// <summary> // /// <summary>

View File

@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.Asset.Tests
/// At the moment we're only test the in-memory part of the FlotsamAssetCache. This is a considerable weakness. /// At the moment we're only test the in-memory part of the FlotsamAssetCache. This is a considerable weakness.
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class FlotsamAssetCacheTests public class FlotsamAssetCacheTests : OpenSimTestCase
{ {
protected TestScene m_scene; protected TestScene m_scene;
protected FlotsamAssetCache m_cache; protected FlotsamAssetCache m_cache;

View File

@ -39,7 +39,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
{ {
[TestFixture] [TestFixture]
public class AvatarFactoryModuleTests public class AvatarFactoryModuleTests : OpenSimTestCase
{ {
/// <summary> /// <summary>
/// Only partial right now since we don't yet test that it's ended up in the avatar appearance service. /// Only partial right now since we don't yet test that it's ended up in the avatar appearance service.

View File

@ -40,7 +40,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.CoreModules.Avatar.Friends.Tests namespace OpenSim.Region.CoreModules.Avatar.Friends.Tests
{ {
[TestFixture] [TestFixture]
public class FriendsModuleTests public class FriendsModuleTests : OpenSimTestCase
{ {
private FriendsModule m_fm; private FriendsModule m_fm;
private TestScene m_scene; private TestScene m_scene;

View File

@ -49,7 +49,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
{ {
[TestFixture] [TestFixture]
public class InventoryAccessModuleTests public class InventoryAccessModuleTests : OpenSimTestCase
{ {
protected TestScene m_scene; protected TestScene m_scene;
protected BasicInventoryAccessModule m_iam; protected BasicInventoryAccessModule m_iam;

View File

@ -35,7 +35,6 @@ using NUnit.Framework;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using Nini.Config; using Nini.Config;
using OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence; using OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo;
@ -44,7 +43,7 @@ using OpenSim.Tests.Common;
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
{ {
[TestFixture] [TestFixture]
public class PresenceConnectorsTests public class PresenceConnectorsTests : OpenSimTestCase
{ {
LocalPresenceServicesConnector m_LocalConnector; LocalPresenceServicesConnector m_LocalConnector;
private void SetUp() private void SetUp()

View File

@ -570,13 +570,22 @@ namespace OpenSim.Region.CoreModules.World.Archiver
// Validate User and Group UUID's // Validate User and Group UUID's
if (parcel.IsGroupOwned)
{
if (!ResolveGroupUuid(parcel.GroupID))
{
parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner;
parcel.GroupID = UUID.Zero;
parcel.IsGroupOwned = false;
}
}
else
{
if (!ResolveUserUuid(scene, parcel.OwnerID)) if (!ResolveUserUuid(scene, parcel.OwnerID))
parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner; parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner;
if (!ResolveGroupUuid(parcel.GroupID)) if (!ResolveGroupUuid(parcel.GroupID))
{
parcel.GroupID = UUID.Zero; parcel.GroupID = UUID.Zero;
parcel.IsGroupOwned = false;
} }
List<LandAccessEntry> accessList = new List<LandAccessEntry>(); List<LandAccessEntry> accessList = new List<LandAccessEntry>();
@ -589,8 +598,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
parcel.ParcelAccessList = accessList; parcel.ParcelAccessList = accessList;
// m_log.DebugFormat( // m_log.DebugFormat(
// "[ARCHIVER]: Adding parcel {0}, local id {1}, area {2}", // "[ARCHIVER]: Adding parcel {0}, local id {1}, owner {2}, group {3}, isGroupOwned {4}, area {5}",
// parcel.Name, parcel.LocalID, parcel.Area); // parcel.Name, parcel.LocalID, parcel.OwnerID, parcel.GroupID, parcel.IsGroupOwned, parcel.Area);
landData.Add(parcel); landData.Add(parcel);
} }

View File

@ -167,7 +167,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
} }
scenesGroup.CalcSceneLocations(); scenesGroup.CalcSceneLocations();
m_archiveWriter = new TarArchiveWriter(m_saveStream); m_archiveWriter = new TarArchiveWriter(m_saveStream);
try try
@ -216,7 +215,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
} }
} }
private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary<UUID, AssetType> assetUuids) private void ArchiveOneRegion(Scene scene, string regionDir, Dictionary<UUID, AssetType> assetUuids)
{ {
m_log.InfoFormat("[ARCHIVER]: Writing region {0}", scene.RegionInfo.RegionName); m_log.InfoFormat("[ARCHIVER]: Writing region {0}", scene.RegionInfo.RegionName);
@ -540,7 +538,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
xtw.WriteElementString("size_in_meters", string.Format("{0},{1}", size.X, size.Y)); xtw.WriteElementString("size_in_meters", string.Format("{0},{1}", size.X, size.Y));
} }
protected void Save(Scene scene, List<SceneObjectGroup> sceneObjects, string regionDir) protected void Save(Scene scene, List<SceneObjectGroup> sceneObjects, string regionDir)
{ {
if (regionDir != string.Empty) if (regionDir != string.Empty)
@ -560,8 +557,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
foreach (ILandObject lo in landObjects) foreach (ILandObject lo in landObjects)
{ {
LandData landData = lo.LandData; LandData landData = lo.LandData;
string landDataPath = String.Format("{0}{1}{2}.xml", string landDataPath
regionDir, ArchiveConstants.LANDDATA_PATH, landData.GlobalID.ToString()); = String.Format("{0}{1}", regionDir, ArchiveConstants.CreateOarLandDataPath(landData));
m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData, m_options)); m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData, m_options));
} }
@ -605,7 +602,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
CloseArchive(String.Empty); CloseArchive(String.Empty);
} }
/// <summary> /// <summary>
/// Closes the archive and notifies that we're done. /// Closes the archive and notifies that we're done.
/// </summary> /// </summary>
@ -629,6 +625,5 @@ namespace OpenSim.Region.CoreModules.World.Archiver
m_rootScene.EventManager.TriggerOarFileSaved(m_requestId, errorMessage); m_rootScene.EventManager.TriggerOarFileSaved(m_requestId, errorMessage);
} }
} }
} }

View File

@ -31,16 +31,19 @@ using System.IO;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using log4net.Config; using log4net.Config;
using Nini.Config;
using NUnit.Framework; using NUnit.Framework;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.Assets; using OpenMetaverse.Assets;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Serialization; using OpenSim.Framework.Serialization;
using OpenSim.Framework.Serialization.External; using OpenSim.Framework.Serialization.External;
using OpenSim.Region.CoreModules.World.Land;
using OpenSim.Region.CoreModules.World.Serialiser; using OpenSim.Region.CoreModules.World.Serialiser;
using OpenSim.Region.CoreModules.World.Terrain; using OpenSim.Region.CoreModules.World.Terrain;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Scenes.Serialization; using OpenSim.Region.Framework.Scenes.Serialization;
using OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups;
using OpenSim.Tests.Common; using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Mock; using OpenSim.Tests.Common.Mock;
using ArchiveConstants = OpenSim.Framework.Serialization.ArchiveConstants; using ArchiveConstants = OpenSim.Framework.Serialization.ArchiveConstants;
@ -69,9 +72,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
{ {
base.SetUp(); base.SetUp();
// FIXME: Do something about this - relying on statics in unit tests causes trouble sooner or later
new SceneManager();
m_archiverModule = new ArchiverModule(); m_archiverModule = new ArchiverModule();
m_serialiserModule = new SerialiserModule(); m_serialiserModule = new SerialiserModule();
TerrainModule terrainModule = new TerrainModule(); TerrainModule terrainModule = new TerrainModule();
@ -128,6 +128,53 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName }; return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName };
} }
private void CreateTestObjects(Scene scene, out SceneObjectGroup sog1, out SceneObjectGroup sog2, out UUID ncAssetUuid)
{
SceneObjectPart part1 = CreateSceneObjectPart1();
sog1 = new SceneObjectGroup(part1);
scene.AddNewSceneObject(sog1, false);
AssetNotecard nc = new AssetNotecard();
nc.BodyText = "Hello World!";
nc.Encode();
ncAssetUuid = UUID.Random();
UUID ncItemUuid = UUID.Random();
AssetBase ncAsset
= AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero);
m_scene.AssetService.Store(ncAsset);
TaskInventoryItem ncItem
= new TaskInventoryItem { Name = "ncItem", AssetID = ncAssetUuid, ItemID = ncItemUuid };
SceneObjectPart part2 = CreateSceneObjectPart2();
sog2 = new SceneObjectGroup(part2);
part2.Inventory.AddInventoryItem(ncItem, true);
scene.AddNewSceneObject(sog2, false);
}
private static void CreateSoundAsset(TarArchiveWriter tar, Assembly assembly, string soundDataResourceName, out byte[] soundData, out UUID soundUuid)
{
using (Stream resource = assembly.GetManifestResourceStream(soundDataResourceName))
{
using (BinaryReader br = new BinaryReader(resource))
{
// FIXME: Use the inspector instead
soundData = br.ReadBytes(99999999);
soundUuid = UUID.Parse("00000000-0000-0000-0000-000000000001");
string soundAssetFileName
= ArchiveConstants.ASSETS_PATH + soundUuid
+ ArchiveConstants.ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SoundWAV];
tar.WriteFile(soundAssetFileName, soundData);
/*
AssetBase soundAsset = AssetHelpers.CreateAsset(soundUuid, soundData);
scene.AssetService.Store(soundAsset);
asset1FileName = ArchiveConstants.ASSETS_PATH + soundUuid + ".wav";
*/
}
}
}
/// <summary> /// <summary>
/// Test saving an OpenSim Region Archive. /// Test saving an OpenSim Region Archive.
/// </summary> /// </summary>
@ -204,30 +251,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
// TODO: Test presence of more files and contents of files. // TODO: Test presence of more files and contents of files.
} }
private void CreateTestObjects(Scene scene, out SceneObjectGroup sog1, out SceneObjectGroup sog2, out UUID ncAssetUuid)
{
SceneObjectPart part1 = CreateSceneObjectPart1();
sog1 = new SceneObjectGroup(part1);
scene.AddNewSceneObject(sog1, false);
AssetNotecard nc = new AssetNotecard();
nc.BodyText = "Hello World!";
nc.Encode();
ncAssetUuid = UUID.Random();
UUID ncItemUuid = UUID.Random();
AssetBase ncAsset
= AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero);
m_scene.AssetService.Store(ncAsset);
TaskInventoryItem ncItem
= new TaskInventoryItem { Name = "ncItem", AssetID = ncAssetUuid, ItemID = ncItemUuid };
SceneObjectPart part2 = CreateSceneObjectPart2();
sog2 = new SceneObjectGroup(part2);
part2.Inventory.AddInventoryItem(ncItem, true);
scene.AddNewSceneObject(sog2, false);
}
/// <summary> /// <summary>
/// Test saving an OpenSim Region Archive with the no assets option /// Test saving an OpenSim Region Archive with the no assets option
/// </summary> /// </summary>
@ -308,59 +331,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
// TODO: Test presence of more files and contents of files. // TODO: Test presence of more files and contents of files.
} }
/// <summary>
/// Test loading an OpenSim Region Archive where the scene object parts are not ordered by link number (e.g.
/// 2 can come after 3).
/// </summary>
[Test]
public void TestLoadOarUnorderedParts()
{
TestHelpers.InMethod();
UUID ownerId = TestHelpers.ParseTail(0xaaaa);
MemoryStream archiveWriteStream = new MemoryStream();
TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);
tar.WriteFile(
ArchiveConstants.CONTROL_FILE_PATH,
new ArchiveWriteRequest(m_scene, (Stream)null, Guid.Empty).CreateControlFile(new ArchiveScenesGroup()));
SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, ownerId, "obj1-", 0x11);
SceneObjectPart sop2
= SceneHelpers.CreateSceneObjectPart("obj1-Part2", TestHelpers.ParseTail(0x12), ownerId);
SceneObjectPart sop3
= SceneHelpers.CreateSceneObjectPart("obj1-Part3", TestHelpers.ParseTail(0x13), ownerId);
// Add the parts so they will be written out in reverse order to the oar
sog1.AddPart(sop3);
sop3.LinkNum = 3;
sog1.AddPart(sop2);
sop2.LinkNum = 2;
tar.WriteFile(
ArchiveConstants.CreateOarObjectPath(sog1.Name, sog1.UUID, sog1.AbsolutePosition),
SceneObjectSerializer.ToXml2Format(sog1));
tar.Close();
MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
lock (this)
{
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
m_archiverModule.DearchiveRegion(archiveReadStream);
}
Assert.That(m_lastErrorMessage, Is.Null);
SceneObjectPart part2 = m_scene.GetSceneObjectPart("obj1-Part2");
Assert.That(part2.LinkNum, Is.EqualTo(2));
SceneObjectPart part3 = m_scene.GetSceneObjectPart("obj1-Part3");
Assert.That(part3.LinkNum, Is.EqualTo(3));
}
/// <summary> /// <summary>
/// Test loading an OpenSim Region Archive. /// Test loading an OpenSim Region Archive.
/// </summary> /// </summary>
@ -435,50 +405,57 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
TestLoadedRegion(part1, soundItemName, soundData); TestLoadedRegion(part1, soundItemName, soundData);
} }
private static void CreateSoundAsset(TarArchiveWriter tar, Assembly assembly, string soundDataResourceName, out byte[] soundData, out UUID soundUuid) /// <summary>
/// Test loading an OpenSim Region Archive where the scene object parts are not ordered by link number (e.g.
/// 2 can come after 3).
/// </summary>
[Test]
public void TestLoadOarUnorderedParts()
{ {
using (Stream resource = assembly.GetManifestResourceStream(soundDataResourceName)) TestHelpers.InMethod();
{
using (BinaryReader br = new BinaryReader(resource))
{
// FIXME: Use the inspector instead
soundData = br.ReadBytes(99999999);
soundUuid = UUID.Parse("00000000-0000-0000-0000-000000000001");
string soundAssetFileName
= ArchiveConstants.ASSETS_PATH + soundUuid
+ ArchiveConstants.ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SoundWAV];
tar.WriteFile(soundAssetFileName, soundData);
/* UUID ownerId = TestHelpers.ParseTail(0xaaaa);
AssetBase soundAsset = AssetHelpers.CreateAsset(soundUuid, soundData);
scene.AssetService.Store(soundAsset); MemoryStream archiveWriteStream = new MemoryStream();
asset1FileName = ArchiveConstants.ASSETS_PATH + soundUuid + ".wav"; TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);
*/
} tar.WriteFile(
} ArchiveConstants.CONTROL_FILE_PATH,
new ArchiveWriteRequest(m_scene, (Stream)null, Guid.Empty).CreateControlFile(new ArchiveScenesGroup()));
SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, ownerId, "obj1-", 0x11);
SceneObjectPart sop2
= SceneHelpers.CreateSceneObjectPart("obj1-Part2", TestHelpers.ParseTail(0x12), ownerId);
SceneObjectPart sop3
= SceneHelpers.CreateSceneObjectPart("obj1-Part3", TestHelpers.ParseTail(0x13), ownerId);
// Add the parts so they will be written out in reverse order to the oar
sog1.AddPart(sop3);
sop3.LinkNum = 3;
sog1.AddPart(sop2);
sop2.LinkNum = 2;
tar.WriteFile(
ArchiveConstants.CreateOarObjectPath(sog1.Name, sog1.UUID, sog1.AbsolutePosition),
SceneObjectSerializer.ToXml2Format(sog1));
tar.Close();
MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
lock (this)
{
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
m_archiverModule.DearchiveRegion(archiveReadStream);
} }
private void TestLoadedRegion(SceneObjectPart part1, string soundItemName, byte[] soundData) Assert.That(m_lastErrorMessage, Is.Null);
{
SceneObjectPart object1PartLoaded = m_scene.GetSceneObjectPart(part1.Name);
Assert.That(object1PartLoaded, Is.Not.Null, "object1 was not loaded"); SceneObjectPart part2 = m_scene.GetSceneObjectPart("obj1-Part2");
Assert.That(object1PartLoaded.Name, Is.EqualTo(part1.Name), "object1 names not identical"); Assert.That(part2.LinkNum, Is.EqualTo(2));
Assert.That(object1PartLoaded.GroupPosition, Is.EqualTo(part1.GroupPosition), "object1 group position not equal");
Assert.That(
object1PartLoaded.RotationOffset, Is.EqualTo(part1.RotationOffset), "object1 rotation offset not equal");
Assert.That(
object1PartLoaded.OffsetPosition, Is.EqualTo(part1.OffsetPosition), "object1 offset position not equal");
Assert.That(object1PartLoaded.SitTargetOrientation, Is.EqualTo(part1.SitTargetOrientation));
Assert.That(object1PartLoaded.SitTargetPosition, Is.EqualTo(part1.SitTargetPosition));
TaskInventoryItem loadedSoundItem = object1PartLoaded.Inventory.GetInventoryItems(soundItemName)[0]; SceneObjectPart part3 = m_scene.GetSceneObjectPart("obj1-Part3");
Assert.That(loadedSoundItem, Is.Not.Null, "loaded sound item was null"); Assert.That(part3.LinkNum, Is.EqualTo(3));
AssetBase loadedSoundAsset = m_scene.AssetService.Get(loadedSoundItem.AssetID.ToString());
Assert.That(loadedSoundAsset, Is.Not.Null, "loaded sound asset was null");
Assert.That(loadedSoundAsset.Data, Is.EqualTo(soundData), "saved and loaded sound data do not match");
Assert.Greater(m_scene.LandChannel.AllParcels().Count, 0, "incorrect number of parcels");
} }
/// <summary> /// <summary>
@ -538,8 +515,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
SerialiserModule serialiserModule = new SerialiserModule(); SerialiserModule serialiserModule = new SerialiserModule();
TerrainModule terrainModule = new TerrainModule(); TerrainModule terrainModule = new TerrainModule();
m_sceneHelpers = new SceneHelpers(); SceneHelpers m_sceneHelpers2 = new SceneHelpers();
TestScene scene2 = m_sceneHelpers.SetupScene(); TestScene scene2 = m_sceneHelpers2.SetupScene();
SceneHelpers.SetupSceneModules(scene2, archiverModule, serialiserModule, terrainModule); SceneHelpers.SetupSceneModules(scene2, archiverModule, serialiserModule, terrainModule);
// Make sure there's a valid owner for the owner we saved (this should have been wiped if the code is // Make sure there's a valid owner for the owner we saved (this should have been wiped if the code is
@ -562,6 +539,71 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
} }
} }
/// <summary>
/// Test OAR loading where the land parcel is group deeded.
/// </summary>
/// <remarks>
/// In this situation, the owner ID is set to the group ID.
/// </remarks>
[Test]
public void TestLoadOarDeededLand()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
UUID landID = TestHelpers.ParseTail(0x10);
MockGroupsServicesConnector groupsService = new MockGroupsServicesConnector();
IConfigSource configSource = new IniConfigSource();
IConfig config = configSource.AddConfig("Groups");
config.Set("Enabled", true);
config.Set("Module", "GroupsModule");
config.Set("DebugEnabled", true);
SceneHelpers.SetupSceneModules(
m_scene, configSource, new object[] { new GroupsModule(), groupsService, new LandManagementModule() });
// Create group in scene for loading
// FIXME: For now we'll put up with the issue that we'll get a group ID that varies across tests.
UUID groupID
= groupsService.CreateGroup(UUID.Zero, "group1", "", true, UUID.Zero, 3, true, true, true, UUID.Zero);
// Construct OAR
MemoryStream oarStream = new MemoryStream();
TarArchiveWriter tar = new TarArchiveWriter(oarStream);
tar.WriteDir(ArchiveConstants.LANDDATA_PATH);
tar.WriteFile(
ArchiveConstants.CONTROL_FILE_PATH,
new ArchiveWriteRequest(m_scene, (Stream)null, Guid.Empty).CreateControlFile(new ArchiveScenesGroup()));
LandObject lo = new LandObject(groupID, true, null);
lo.SetLandBitmap(lo.BasicFullRegionLandBitmap());
LandData ld = lo.LandData;
ld.GlobalID = landID;
string ldPath = ArchiveConstants.CreateOarLandDataPath(ld);
tar.WriteFile(ldPath, LandDataSerializer.Serialize(ld, null));
tar.Close();
oarStream = new MemoryStream(oarStream.ToArray());
// Load OAR
lock (this)
{
m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
m_archiverModule.DearchiveRegion(oarStream);
}
ILandObject rLo = m_scene.LandChannel.GetLandObject(16, 16);
LandData rLd = rLo.LandData;
Assert.That(rLd.GlobalID, Is.EqualTo(landID));
Assert.That(rLd.OwnerID, Is.EqualTo(groupID));
Assert.That(rLd.GroupID, Is.EqualTo(groupID));
Assert.That(rLd.IsGroupOwned, Is.EqualTo(true));
}
/// <summary> /// <summary>
/// Test loading the region settings of an OpenSim Region Archive. /// Test loading the region settings of an OpenSim Region Archive.
/// </summary> /// </summary>
@ -781,9 +823,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
} }
} }
// Save OAR // Save OAR
MemoryStream archiveWriteStream = new MemoryStream(); MemoryStream archiveWriteStream = new MemoryStream();
m_scene.EventManager.OnOarFileSaved += SaveCompleted; m_scene.EventManager.OnOarFileSaved += SaveCompleted;
@ -800,7 +840,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
// Check that the OAR contains the expected data // Check that the OAR contains the expected data
Assert.That(m_lastRequestId, Is.EqualTo(requestId)); Assert.That(m_lastRequestId, Is.EqualTo(requestId));
byte[] archive = archiveWriteStream.ToArray(); byte[] archive = archiveWriteStream.ToArray();
@ -892,7 +931,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
} }
ArchiveScenesGroup scenesGroup = new ArchiveScenesGroup(); ArchiveScenesGroup scenesGroup = new ArchiveScenesGroup();
SceneManager.Instance.ForEachScene(delegate(Scene scene) m_sceneHelpers.SceneManager.ForEachScene(delegate(Scene scene)
{ {
scenesGroup.AddScene(scene); scenesGroup.AddScene(scene);
}); });
@ -950,13 +989,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
// Delete the current objects, to test that they're loaded from the OAR and didn't // Delete the current objects, to test that they're loaded from the OAR and didn't
// just remain in the scene. // just remain in the scene.
SceneManager.Instance.ForEachScene(delegate(Scene scene) m_sceneHelpers.SceneManager.ForEachScene(delegate(Scene scene)
{ {
scene.DeleteAllSceneObjects(); scene.DeleteAllSceneObjects();
}); });
// Create a "hole", to test that that the corresponding region isn't loaded from the OAR // Create a "hole", to test that that the corresponding region isn't loaded from the OAR
SceneManager.Instance.CloseScene(SceneManager.Instance.Scenes[1]); m_sceneHelpers.SceneManager.CloseScene(SceneManager.Instance.Scenes[1]);
// Check thay the OAR file contains the expected data // Check thay the OAR file contains the expected data
@ -971,10 +1010,32 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
Assert.That(m_lastErrorMessage, Is.Null); Assert.That(m_lastErrorMessage, Is.Null);
Assert.AreEqual(3, SceneManager.Instance.Scenes.Count); Assert.AreEqual(3, m_sceneHelpers.SceneManager.Scenes.Count);
TestLoadedRegion(part1, soundItemName, soundData); TestLoadedRegion(part1, soundItemName, soundData);
} }
private void TestLoadedRegion(SceneObjectPart part1, string soundItemName, byte[] soundData)
{
SceneObjectPart object1PartLoaded = m_scene.GetSceneObjectPart(part1.Name);
Assert.That(object1PartLoaded, Is.Not.Null, "object1 was not loaded");
Assert.That(object1PartLoaded.Name, Is.EqualTo(part1.Name), "object1 names not identical");
Assert.That(object1PartLoaded.GroupPosition, Is.EqualTo(part1.GroupPosition), "object1 group position not equal");
Assert.That(
object1PartLoaded.RotationOffset, Is.EqualTo(part1.RotationOffset), "object1 rotation offset not equal");
Assert.That(
object1PartLoaded.OffsetPosition, Is.EqualTo(part1.OffsetPosition), "object1 offset position not equal");
Assert.That(object1PartLoaded.SitTargetOrientation, Is.EqualTo(part1.SitTargetOrientation));
Assert.That(object1PartLoaded.SitTargetPosition, Is.EqualTo(part1.SitTargetPosition));
TaskInventoryItem loadedSoundItem = object1PartLoaded.Inventory.GetInventoryItems(soundItemName)[0];
Assert.That(loadedSoundItem, Is.Not.Null, "loaded sound item was null");
AssetBase loadedSoundAsset = m_scene.AssetService.Get(loadedSoundItem.AssetID.ToString());
Assert.That(loadedSoundAsset, Is.Not.Null, "loaded sound asset was null");
Assert.That(loadedSoundAsset.Data, Is.EqualTo(soundData), "saved and loaded sound data do not match");
Assert.Greater(m_scene.LandChannel.AllParcels().Count, 0, "incorrect number of parcels");
}
} }
} }

View File

@ -55,6 +55,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
protected EstateManagementCommands m_commands; protected EstateManagementCommands m_commands;
/// <summary>
/// If false, region restart requests from the client are blocked even if they are otherwise legitimate.
/// </summary>
public bool AllowRegionRestartFromClient { get; set; }
private EstateTerrainXferHandler TerrainUploader; private EstateTerrainXferHandler TerrainUploader;
public TelehubManager m_Telehub; public TelehubManager m_Telehub;
@ -64,6 +69,53 @@ namespace OpenSim.Region.CoreModules.World.Estate
private int m_delayCount = 0; private int m_delayCount = 0;
#region Region Module interface
public string Name { get { return "EstateManagementModule"; } }
public Type ReplaceableInterface { get { return null; } }
public void Initialise(IConfigSource source)
{
AllowRegionRestartFromClient = true;
IConfig config = source.Configs["EstateManagement"];
if (config != null)
AllowRegionRestartFromClient = config.GetBoolean("AllowRegionRestartFromClient", true);
}
public void AddRegion(Scene scene)
{
Scene = scene;
Scene.RegisterModuleInterface<IEstateModule>(this);
Scene.EventManager.OnNewClient += EventManager_OnNewClient;
Scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight;
m_Telehub = new TelehubManager(scene);
m_commands = new EstateManagementCommands(this);
m_commands.Initialise();
}
public void RemoveRegion(Scene scene) {}
public void RegionLoaded(Scene scene)
{
// Sets up the sun module based no the saved Estate and Region Settings
// DO NOT REMOVE or the sun will stop working
scene.TriggerEstateSunUpdate();
UserManager = scene.RequestModuleInterface<IUserManagement>();
}
public void Close()
{
m_commands.Close();
}
#endregion
#region Packet Data Responders #region Packet Data Responders
private void clientSendDetailedEstateData(IClientAPI remote_client, UUID invoice) private void clientSendDetailedEstateData(IClientAPI remote_client, UUID invoice)
@ -197,6 +249,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
Scene.RegionInfo.RegionSettings.TerrainTexture4 = texture; Scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
break; break;
} }
Scene.RegionInfo.RegionSettings.Save(); Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange(); TriggerRegionInfoChange();
sendRegionInfoPacketToAll(); sendRegionInfoPacketToAll();
@ -228,6 +281,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
Scene.RegionInfo.RegionSettings.Elevation2NE = highValue; Scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
break; break;
} }
Scene.RegionInfo.RegionSettings.Save(); Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange(); TriggerRegionInfoChange();
sendRegionHandshakeToAll(); sendRegionHandshakeToAll();
@ -268,6 +322,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds) private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds)
{ {
if (!AllowRegionRestartFromClient)
{
remoteClient.SendAlertMessage("Region restart has been disabled on this simulator.");
return;
}
IRestartModule restartModule = Scene.RequestModuleInterface<IRestartModule>(); IRestartModule restartModule = Scene.RequestModuleInterface<IRestartModule>();
if (restartModule != null) if (restartModule != null)
{ {
@ -352,6 +412,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
} }
} }
if ((estateAccessType & 8) != 0) // User remove if ((estateAccessType & 8) != 0) // User remove
{ {
if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true)) if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true))
@ -383,6 +444,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions");
} }
} }
if ((estateAccessType & 16) != 0) // Group add if ((estateAccessType & 16) != 0) // Group add
{ {
if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true)) if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true))
@ -1118,49 +1180,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
#endregion #endregion
#region Region Module interface
public string Name { get { return "EstateManagementModule"; } }
public Type ReplaceableInterface { get { return null; } }
public void Initialise(IConfigSource source) {}
public void AddRegion(Scene scene)
{
m_regionChangeTimer.AutoReset = false;
m_regionChangeTimer.Interval = 2000;
m_regionChangeTimer.Elapsed += RaiseRegionInfoChange;
Scene = scene;
Scene.RegisterModuleInterface<IEstateModule>(this);
Scene.EventManager.OnNewClient += EventManager_OnNewClient;
Scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight;
m_Telehub = new TelehubManager(scene);
m_commands = new EstateManagementCommands(this);
m_commands.Initialise();
}
public void RemoveRegion(Scene scene) {}
public void RegionLoaded(Scene scene)
{
// Sets up the sun module based no the saved Estate and Region Settings
// DO NOT REMOVE or the sun will stop working
scene.TriggerEstateSunUpdate();
UserManager = scene.RequestModuleInterface<IUserManagement>();
}
public void Close()
{
m_commands.Close();
}
#endregion
#region Other Functions #region Other Functions
public void changeWaterHeight(float height) public void changeWaterHeight(float height)

View File

@ -1384,10 +1384,8 @@ namespace OpenSim.Region.CoreModules.World.Land
} }
for (int i = 0; i < data.Count; i++) for (int i = 0; i < data.Count; i++)
{
IncomingLandObjectFromStorage(data[i]); IncomingLandObjectFromStorage(data[i]);
} }
}
public void IncomingLandObjectFromStorage(LandData data) public void IncomingLandObjectFromStorage(LandData data)
{ {

View File

@ -748,9 +748,10 @@ namespace OpenSim.Region.CoreModules.World.Land
int ty = min_y * 4; int ty = min_y * 4;
if (ty > ((int)Constants.RegionSize - 1)) if (ty > ((int)Constants.RegionSize - 1))
ty = ((int)Constants.RegionSize - 1); ty = ((int)Constants.RegionSize - 1);
LandData.AABBMin = LandData.AABBMin =
new Vector3((float) (min_x * 4), (float) (min_y * 4), new Vector3(
(float) m_scene.Heightmap[tx, ty]); (float)(min_x * 4), (float)(min_y * 4), m_scene != null ? (float)m_scene.Heightmap[tx, ty] : 0);
tx = max_x * 4; tx = max_x * 4;
if (tx > ((int)Constants.RegionSize - 1)) if (tx > ((int)Constants.RegionSize - 1))
@ -758,9 +759,11 @@ namespace OpenSim.Region.CoreModules.World.Land
ty = max_y * 4; ty = max_y * 4;
if (ty > ((int)Constants.RegionSize - 1)) if (ty > ((int)Constants.RegionSize - 1))
ty = ((int)Constants.RegionSize - 1); ty = ((int)Constants.RegionSize - 1);
LandData.AABBMax =
new Vector3((float) (max_x * 4), (float) (max_y * 4), LandData.AABBMax
(float) m_scene.Heightmap[tx, ty]); = new Vector3(
(float)(max_x * 4), (float)(max_y * 4), m_scene != null ? (float)m_scene.Heightmap[tx, ty] : 0);
LandData.Area = tempArea; LandData.Area = tempArea;
} }

View File

@ -41,7 +41,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.CoreModules.World.Land.Tests namespace OpenSim.Region.CoreModules.World.Land.Tests
{ {
[TestFixture] [TestFixture]
public class PrimCountModuleTests public class PrimCountModuleTests : OpenSimTestCase
{ {
protected UUID m_userId = new UUID("00000000-0000-0000-0000-100000000000"); protected UUID m_userId = new UUID("00000000-0000-0000-0000-100000000000");
protected UUID m_groupId = new UUID("00000000-0000-0000-8888-000000000000"); protected UUID m_groupId = new UUID("00000000-0000-0000-8888-000000000000");

View File

@ -44,7 +44,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests
{ {
[TestFixture] [TestFixture]
public class MoapTests public class MoapTests : OpenSimTestCase
{ {
protected TestScene m_scene; protected TestScene m_scene;
protected MoapModule m_module; protected MoapModule m_module;

View File

@ -39,7 +39,7 @@ using OpenSim.Tests.Common;
namespace OpenSim.Region.CoreModules.World.Serialiser.Tests namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
{ {
[TestFixture] [TestFixture]
public class SerialiserTests public class SerialiserTests : OpenSimTestCase
{ {
private string xml = @" private string xml = @"
<SceneObjectGroup> <SceneObjectGroup>

View File

@ -43,8 +43,8 @@ namespace OpenSim.Region.CoreModules.World.Sound
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SoundModule")] [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SoundModule")]
public class SoundModule : INonSharedRegionModule, ISoundModule public class SoundModule : INonSharedRegionModule, ISoundModule
{ {
private static readonly ILog m_log = LogManager.GetLogger( // private static readonly ILog m_log = LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType); // MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene; private Scene m_scene;

View File

@ -30,11 +30,12 @@ using NUnit.Framework;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.CoreModules.World.Terrain.PaintBrushes; using OpenSim.Region.CoreModules.World.Terrain.PaintBrushes;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common;
namespace OpenSim.Region.CoreModules.World.Terrain.Tests namespace OpenSim.Region.CoreModules.World.Terrain.Tests
{ {
[TestFixture] [TestFixture]
public class TerrainTest public class TerrainTest : OpenSimTestCase
{ {
[Test] [Test]
public void BrushTest() public void BrushTest()

View File

@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules
public void Initialise(IConfigSource config) public void Initialise(IConfigSource config)
{ {
m_windConfig = config.Configs["Wind"]; m_windConfig = config.Configs["Wind"];
string desiredWindPlugin = m_dWindPluginName; // string desiredWindPlugin = m_dWindPluginName;
if (m_windConfig != null) if (m_windConfig != null)
{ {

View File

@ -762,7 +762,12 @@ namespace OpenSim.Region.Framework.Scenes
// //
// Out of memory // Out of memory
// Operating system has killed the plugin // Operating system has killed the plugin
m_sceneGraph.UnRecoverableError += RestartNow; m_sceneGraph.UnRecoverableError
+= () =>
{
m_log.ErrorFormat("[SCENE]: Restarting region {0} due to unrecoverable physics crash", Name);
RestartNow();
};
RegisterDefaultSceneEvents(); RegisterDefaultSceneEvents();

View File

@ -37,7 +37,7 @@ using OpenSim.Tests.Common;
namespace OpenSim.Region.Framework.Scenes.Tests namespace OpenSim.Region.Framework.Scenes.Tests
{ {
[TestFixture] [TestFixture]
public class BorderTests public class BorderTests : OpenSimTestCase
{ {
[Test] [Test]
public void TestCross() public void TestCross()

View File

@ -41,7 +41,7 @@ using OpenSim.Tests.Common;
namespace OpenSim.Region.Framework.Scenes.Tests namespace OpenSim.Region.Framework.Scenes.Tests
{ {
[TestFixture, LongRunning] [TestFixture, LongRunning]
public class EntityManagerTests public class EntityManagerTests : OpenSimTestCase
{ {
static public Random random; static public Random random;
SceneObjectGroup found; SceneObjectGroup found;

View File

@ -40,7 +40,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Scenes.Tests namespace OpenSim.Region.Framework.Scenes.Tests
{ {
[TestFixture] [TestFixture]
public class SceneGraphTests public class SceneGraphTests : OpenSimTestCase
{ {
[Test] [Test]
public void TestDuplicateObject() public void TestDuplicateObject()

View File

@ -41,7 +41,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Scenes.Tests namespace OpenSim.Region.Framework.Scenes.Tests
{ {
[TestFixture] [TestFixture]
public class SceneManagerTests public class SceneManagerTests : OpenSimTestCase
{ {
[Test] [Test]
public void TestClose() public void TestClose()

View File

@ -29,6 +29,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using Nini.Config;
using NUnit.Framework; using NUnit.Framework;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
@ -182,6 +183,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// <summary> /// <summary>
/// Test deleting an object from a scene. /// Test deleting an object from a scene.
/// </summary> /// </summary>
/// <remarks>
/// This is the most basic form of delete. For all more sophisticated forms of derez (done asynchrnously
/// and where object can be taken to user inventory, etc.), see SceneObjectDeRezTests.
/// </remarks>
[Test] [Test]
public void TestDeleteSceneObject() public void TestDeleteSceneObject()
{ {
@ -200,100 +205,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(retrievedPart, Is.Null); Assert.That(retrievedPart, Is.Null);
} }
/// <summary>
/// Test deleting an object asynchronously
/// </summary>
[Test]
public void TestDeleteSceneObjectAsync()
{
TestHelpers.InMethod();
//log4net.Config.XmlConfigurator.Configure();
UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
TestScene scene = new SceneHelpers().SetupScene();
// Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
sogd.Enabled = false;
SceneObjectGroup so = SceneHelpers.AddSceneObject(scene);
IClientAPI client = SceneHelpers.AddScenePresence(scene, agentId).ControllingClient;
scene.DeRezObjects(client, new System.Collections.Generic.List<uint>() { so.LocalId }, UUID.Zero, DeRezAction.Delete, UUID.Zero);
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId);
Assert.That(retrievedPart, Is.Not.Null);
Assert.That(so.IsDeleted, Is.False);
sogd.InventoryDeQueueAndDelete();
Assert.That(so.IsDeleted, Is.True);
SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
Assert.That(retrievedPart2, Is.Null);
}
/// <summary>
/// Test deleting an object asynchronously to user inventory.
/// </summary>
// [Test]
public void TestDeleteSceneObjectAsyncToUserInventory()
{
TestHelpers.InMethod();
TestHelpers.EnableLogging();
UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
string myObjectName = "Fred";
TestScene scene = new SceneHelpers().SetupScene();
// Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
sogd.Enabled = false;
SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, myObjectName, agentId);
// Assert.That(
// scene.CommsManager.UserAdminService.AddUser(
// "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId),
// Is.EqualTo(agentId));
UserAccount ua = UserAccountHelpers.CreateUserWithInventory(scene, agentId);
InventoryFolderBase folder1
= UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, ua.PrincipalID, "folder1");
IClientAPI client = SceneHelpers.AddScenePresence(scene, agentId).ControllingClient;
scene.DeRezObjects(client, new List<uint>() { so.LocalId }, UUID.Zero, DeRezAction.Take, folder1.ID);
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId);
Assert.That(retrievedPart, Is.Not.Null);
Assert.That(so.IsDeleted, Is.False);
sogd.InventoryDeQueueAndDelete();
Assert.That(so.IsDeleted, Is.True);
SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
Assert.That(retrievedPart2, Is.Null);
// SceneSetupHelpers.DeleteSceneObjectAsync(scene, part, DeRezAction.Take, userInfo.RootFolder.ID, client);
InventoryItemBase retrievedItem
= UserInventoryHelpers.GetInventoryItem(
scene.InventoryService, ua.PrincipalID, "folder1/" + myObjectName);
// Check that we now have the taken part in our inventory
Assert.That(retrievedItem, Is.Not.Null);
// Check that the taken part has actually disappeared
// SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
// Assert.That(retrievedPart, Is.Null);
}
/// <summary> /// <summary>
/// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not /// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not
/// in a scene and is useful if one wants to supply a UUID directly rather than use the one generated by /// in a scene and is useful if one wants to supply a UUID directly rather than use the one generated by

View File

@ -33,22 +33,24 @@ using NUnit.Framework;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Region.CoreModules.Framework.InventoryAccess;
using OpenSim.Region.CoreModules.World.Permissions; using OpenSim.Region.CoreModules.World.Permissions;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Services.Interfaces;
using OpenSim.Tests.Common; using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Mock; using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Scenes.Tests namespace OpenSim.Region.Framework.Scenes.Tests
{ {
/// <summary> /// <summary>
/// Tests derez of scene objects by users. /// Tests derez of scene objects.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// This is at a level above the SceneObjectBasicTests, which act on the scene directly. /// This is at a level above the SceneObjectBasicTests, which act on the scene directly.
/// TODO: These tests are very incomplete - they only test for a few conditions. /// TODO: These tests are incomplete - need to test more kinds of derez (e.g. return object).
/// </remarks> /// </remarks>
[TestFixture] [TestFixture]
public class SceneObjectDeRezTests public class SceneObjectDeRezTests : OpenSimTestCase
{ {
/// <summary> /// <summary>
/// Test deleting an object from a scene. /// Test deleting an object from a scene.
@ -76,14 +78,20 @@ namespace OpenSim.Region.Framework.Scenes.Tests
= new SceneObjectPart(userId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); = new SceneObjectPart(userId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero);
part.Name = "obj1"; part.Name = "obj1";
scene.AddNewSceneObject(new SceneObjectGroup(part), false); scene.AddNewSceneObject(new SceneObjectGroup(part), false);
List<uint> localIds = new List<uint>(); List<uint> localIds = new List<uint>();
localIds.Add(part.LocalId); localIds.Add(part.LocalId);
scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero); scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero);
// Check that object isn't deleted until we crank the sogd handle.
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
Assert.That(retrievedPart, Is.Not.Null);
Assert.That(retrievedPart.ParentGroup.IsDeleted, Is.False);
sogd.InventoryDeQueueAndDelete(); sogd.InventoryDeQueueAndDelete();
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId);
Assert.That(retrievedPart, Is.Null); Assert.That(retrievedPart2, Is.Null);
} }
/// <summary> /// <summary>
@ -125,5 +133,66 @@ namespace OpenSim.Region.Framework.Scenes.Tests
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID)); Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
} }
/// <summary>
/// Test deleting an object asynchronously to user inventory.
/// </summary>
[Test]
public void TestDeleteSceneObjectAsyncToUserInventory()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
string myObjectName = "Fred";
TestScene scene = new SceneHelpers().SetupScene();
IConfigSource configSource = new IniConfigSource();
IConfig config = configSource.AddConfig("Modules");
config.Set("InventoryAccessModule", "BasicInventoryAccessModule");
SceneHelpers.SetupSceneModules(
scene, configSource, new object[] { new BasicInventoryAccessModule() });
SceneHelpers.SetupSceneModules(scene, new object[] { });
// Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
sogd.Enabled = false;
SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, myObjectName, agentId);
UserAccount ua = UserAccountHelpers.CreateUserWithInventory(scene, agentId);
InventoryFolderBase folder1
= UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, ua.PrincipalID, "folder1");
IClientAPI client = SceneHelpers.AddScenePresence(scene, agentId).ControllingClient;
scene.DeRezObjects(client, new List<uint>() { so.LocalId }, UUID.Zero, DeRezAction.Take, folder1.ID);
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId);
Assert.That(retrievedPart, Is.Not.Null);
Assert.That(so.IsDeleted, Is.False);
sogd.InventoryDeQueueAndDelete();
Assert.That(so.IsDeleted, Is.True);
SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
Assert.That(retrievedPart2, Is.Null);
// SceneSetupHelpers.DeleteSceneObjectAsync(scene, part, DeRezAction.Take, userInfo.RootFolder.ID, client);
InventoryItemBase retrievedItem
= UserInventoryHelpers.GetInventoryItem(
scene.InventoryService, ua.PrincipalID, "folder1/" + myObjectName);
// Check that we now have the taken part in our inventory
Assert.That(retrievedItem, Is.Not.Null);
// Check that the taken part has actually disappeared
// SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
// Assert.That(retrievedPart, Is.Null);
}
} }
} }

View File

@ -40,7 +40,7 @@ using log4net;
namespace OpenSim.Region.Framework.Scenes.Tests namespace OpenSim.Region.Framework.Scenes.Tests
{ {
[TestFixture] [TestFixture]
public class SceneObjectLinkingTests public class SceneObjectLinkingTests : OpenSimTestCase
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@ -41,7 +41,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Basic scene object resize tests /// Basic scene object resize tests
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class SceneObjectResizeTests public class SceneObjectResizeTests : OpenSimTestCase
{ {
/// <summary> /// <summary>
/// Test resizing an object /// Test resizing an object

View File

@ -40,7 +40,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Scenes.Tests namespace OpenSim.Region.Framework.Scenes.Tests
{ {
[TestFixture] [TestFixture]
public class SceneObjectScriptTests public class SceneObjectScriptTests : OpenSimTestCase
{ {
[Test] [Test]
public void TestAddScript() public void TestAddScript()

View File

@ -42,14 +42,16 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Spatial scene object tests (will eventually cover root and child part position, rotation properties, etc.) /// Spatial scene object tests (will eventually cover root and child part position, rotation properties, etc.)
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class SceneObjectSpatialTests public class SceneObjectSpatialTests : OpenSimTestCase
{ {
TestScene m_scene; TestScene m_scene;
UUID m_ownerId = TestHelpers.ParseTail(0x1); UUID m_ownerId = TestHelpers.ParseTail(0x1);
[SetUp] [SetUp]
public void SetUp() public override void SetUp()
{ {
base.SetUp();
m_scene = new SceneHelpers().SetupScene(); m_scene = new SceneHelpers().SetupScene();
} }

View File

@ -42,7 +42,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Basic scene object status tests /// Basic scene object status tests
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class SceneObjectStatusTests public class SceneObjectStatusTests : OpenSimTestCase
{ {
private TestScene m_scene; private TestScene m_scene;
private UUID m_ownerId = TestHelpers.ParseTail(0x1); private UUID m_ownerId = TestHelpers.ParseTail(0x1);

View File

@ -51,7 +51,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Scene presence animation tests /// Scene presence animation tests
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class ScenePresenceAnimationTests public class ScenePresenceAnimationTests : OpenSimTestCase
{ {
[Test] [Test]
public void TestFlyingAnimation() public void TestFlyingAnimation()

View File

@ -42,7 +42,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Scenes.Tests namespace OpenSim.Region.Framework.Scenes.Tests
{ {
[TestFixture] [TestFixture]
public class ScenePresenceAutopilotTests public class ScenePresenceAutopilotTests : OpenSimTestCase
{ {
private TestScene m_scene; private TestScene m_scene;

View File

@ -43,7 +43,7 @@ using System.Threading;
namespace OpenSim.Region.Framework.Scenes.Tests namespace OpenSim.Region.Framework.Scenes.Tests
{ {
[TestFixture] [TestFixture]
public class ScenePresenceSitTests public class ScenePresenceSitTests : OpenSimTestCase
{ {
private TestScene m_scene; private TestScene m_scene;
private ScenePresence m_sp; private ScenePresence m_sp;

View File

@ -49,7 +49,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Teleport tests in a standalone OpenSim /// Teleport tests in a standalone OpenSim
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class ScenePresenceTeleportTests public class ScenePresenceTeleportTests : OpenSimTestCase
{ {
[TestFixtureSetUp] [TestFixtureSetUp]
public void FixtureInit() public void FixtureInit()

View File

@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Scene presence tests /// Scene presence tests
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class SceneTests public class SceneTests : OpenSimTestCase
{ {
/// <summary> /// <summary>
/// Very basic scene update test. Should become more elaborate with time. /// Very basic scene update test. Should become more elaborate with time.

View File

@ -50,7 +50,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Tests namespace OpenSim.Region.Framework.Tests
{ {
[TestFixture] [TestFixture]
public class TaskInventoryTests public class TaskInventoryTests : OpenSimTestCase
{ {
[Test] [Test]
public void TestAddTaskInventoryItem() public void TestAddTaskInventoryItem()

View File

@ -38,7 +38,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.Framework.Scenes.Tests namespace OpenSim.Region.Framework.Scenes.Tests
{ {
[TestFixture] [TestFixture]
public class UuidGathererTests public class UuidGathererTests : OpenSimTestCase
{ {
protected IAssetService m_assetService; protected IAssetService m_assetService;
protected UuidGatherer m_uuidGatherer; protected UuidGatherer m_uuidGatherer;

View File

@ -36,7 +36,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
{ {
UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID); UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID);
void UpdateGroup(UUID RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish); void UpdateGroup(UUID RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish);
/// <summary>
/// Get the group record.
/// </summary>
/// <returns></returns>
/// <param name='RequestingAgentID'>The UUID of the user making the request.</param>
/// <param name='GroupID'>
/// The ID of the record to retrieve.
/// GroupName may be specified instead, in which case this parameter will be UUID.Zero
/// </param>
/// <param name='GroupName'>
/// The name of the group to retrieve.
/// GroupID may be specified instead, in which case this parmeter will be null.
/// </param>
GroupRecord GetGroupRecord(UUID RequestingAgentID, UUID GroupID, string GroupName); GroupRecord GetGroupRecord(UUID RequestingAgentID, UUID GroupID, string GroupName);
List<DirGroupsReplyData> FindGroups(UUID RequestingAgentID, string search); List<DirGroupsReplyData> FindGroups(UUID RequestingAgentID, string search);
List<GroupMembersData> GetGroupMembers(UUID RequestingAgentID, UUID GroupID); List<GroupMembersData> GetGroupMembers(UUID RequestingAgentID, UUID GroupID);

View File

@ -42,7 +42,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
/// Basic groups module tests /// Basic groups module tests
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class GroupsModuleTests public class GroupsModuleTests : OpenSimTestCase
{ {
[Test] [Test]
public void TestBasic() public void TestBasic()

View File

@ -54,13 +54,62 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
private bool m_debugEnabled = false; private bool m_debugEnabled = false;
public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | public const GroupPowers DefaultEveryonePowers
GroupPowers.Accountable | = GroupPowers.AllowSetHome
GroupPowers.JoinChat | | GroupPowers.Accountable
GroupPowers.AllowVoiceChat | | GroupPowers.JoinChat
GroupPowers.ReceiveNotices | | GroupPowers.AllowVoiceChat
GroupPowers.StartProposal | | GroupPowers.ReceiveNotices
GroupPowers.VoteOnProposal; | GroupPowers.StartProposal
| GroupPowers.VoteOnProposal;
// Would this be cleaner as (GroupPowers)ulong.MaxValue?
public const GroupPowers DefaultOwnerPowers
= GroupPowers.Accountable
| GroupPowers.AllowEditLand
| GroupPowers.AllowFly
| GroupPowers.AllowLandmark
| GroupPowers.AllowRez
| GroupPowers.AllowSetHome
| GroupPowers.AllowVoiceChat
| GroupPowers.AssignMember
| GroupPowers.AssignMemberLimited
| GroupPowers.ChangeActions
| GroupPowers.ChangeIdentity
| GroupPowers.ChangeMedia
| GroupPowers.ChangeOptions
| GroupPowers.CreateRole
| GroupPowers.DeedObject
| GroupPowers.DeleteRole
| GroupPowers.Eject
| GroupPowers.FindPlaces
| GroupPowers.Invite
| GroupPowers.JoinChat
| GroupPowers.LandChangeIdentity
| GroupPowers.LandDeed
| GroupPowers.LandDivideJoin
| GroupPowers.LandEdit
| GroupPowers.LandEjectAndFreeze
| GroupPowers.LandGardening
| GroupPowers.LandManageAllowed
| GroupPowers.LandManageBanned
| GroupPowers.LandManagePasses
| GroupPowers.LandOptions
| GroupPowers.LandRelease
| GroupPowers.LandSetSale
| GroupPowers.ModerateChat
| GroupPowers.ObjectManipulate
| GroupPowers.ObjectSetForSale
| GroupPowers.ReceiveNotices
| GroupPowers.RemoveMember
| GroupPowers.ReturnGroupOwned
| GroupPowers.ReturnGroupSet
| GroupPowers.ReturnNonGroup
| GroupPowers.RoleProperties
| GroupPowers.SendNotices
| GroupPowers.SetLandingPoint
| GroupPowers.StartProposal
| GroupPowers.VoteOnProposal;
private bool m_connectorEnabled = false; private bool m_connectorEnabled = false;
@ -219,59 +268,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
param["AllowPublish"] = allowPublish == true ? 1 : 0; param["AllowPublish"] = allowPublish == true ? 1 : 0;
param["MaturePublish"] = maturePublish == true ? 1 : 0; param["MaturePublish"] = maturePublish == true ? 1 : 0;
param["FounderID"] = founderID.ToString(); param["FounderID"] = founderID.ToString();
param["EveryonePowers"] = ((ulong)m_DefaultEveryonePowers).ToString(); param["EveryonePowers"] = ((ulong)DefaultEveryonePowers).ToString();
param["OwnerRoleID"] = OwnerRoleID.ToString(); param["OwnerRoleID"] = OwnerRoleID.ToString();
param["OwnersPowers"] = ((ulong)DefaultOwnerPowers).ToString();
// Would this be cleaner as (GroupPowers)ulong.MaxValue;
GroupPowers OwnerPowers = GroupPowers.Accountable
| GroupPowers.AllowEditLand
| GroupPowers.AllowFly
| GroupPowers.AllowLandmark
| GroupPowers.AllowRez
| GroupPowers.AllowSetHome
| GroupPowers.AllowVoiceChat
| GroupPowers.AssignMember
| GroupPowers.AssignMemberLimited
| GroupPowers.ChangeActions
| GroupPowers.ChangeIdentity
| GroupPowers.ChangeMedia
| GroupPowers.ChangeOptions
| GroupPowers.CreateRole
| GroupPowers.DeedObject
| GroupPowers.DeleteRole
| GroupPowers.Eject
| GroupPowers.FindPlaces
| GroupPowers.Invite
| GroupPowers.JoinChat
| GroupPowers.LandChangeIdentity
| GroupPowers.LandDeed
| GroupPowers.LandDivideJoin
| GroupPowers.LandEdit
| GroupPowers.LandEjectAndFreeze
| GroupPowers.LandGardening
| GroupPowers.LandManageAllowed
| GroupPowers.LandManageBanned
| GroupPowers.LandManagePasses
| GroupPowers.LandOptions
| GroupPowers.LandRelease
| GroupPowers.LandSetSale
| GroupPowers.ModerateChat
| GroupPowers.ObjectManipulate
| GroupPowers.ObjectSetForSale
| GroupPowers.ReceiveNotices
| GroupPowers.RemoveMember
| GroupPowers.ReturnGroupOwned
| GroupPowers.ReturnGroupSet
| GroupPowers.ReturnNonGroup
| GroupPowers.RoleProperties
| GroupPowers.SendNotices
| GroupPowers.SetLandingPoint
| GroupPowers.StartProposal
| GroupPowers.VoteOnProposal;
param["OwnersPowers"] = ((ulong)OwnerPowers).ToString();
Hashtable respData = XmlRpcCall(requestingAgentID, "groups.createGroup", param); Hashtable respData = XmlRpcCall(requestingAgentID, "groups.createGroup", param);
@ -612,8 +611,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
} }
return Roles; return Roles;
} }
public List<GroupRolesData> GetGroupRoles(UUID requestingAgentID, UUID GroupID) public List<GroupRolesData> GetGroupRoles(UUID requestingAgentID, UUID GroupID)
@ -676,7 +673,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
} }
return members; return members;
} }
public List<GroupRoleMembersData> GetGroupRoleMembers(UUID requestingAgentID, UUID GroupID) public List<GroupRoleMembersData> GetGroupRoleMembers(UUID requestingAgentID, UUID GroupID)
@ -727,9 +723,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
values.Add(data); values.Add(data);
} }
} }
return values;
return values;
} }
public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID) public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID)
{ {
Hashtable param = new Hashtable(); Hashtable param = new Hashtable();
@ -737,7 +734,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
Hashtable respData = XmlRpcCall(requestingAgentID, "groups.getGroupNotice", param); Hashtable respData = XmlRpcCall(requestingAgentID, "groups.getGroupNotice", param);
if (respData.Contains("error")) if (respData.Contains("error"))
{ {
return null; return null;
@ -761,6 +757,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
return data; return data;
} }
public void AddGroupNotice(UUID requestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket) public void AddGroupNotice(UUID requestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket)
{ {
string binBucket = OpenMetaverse.Utils.BytesToHexString(binaryBucket, ""); string binBucket = OpenMetaverse.Utils.BytesToHexString(binaryBucket, "");
@ -777,8 +774,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
XmlRpcCall(requestingAgentID, "groups.addGroupNotice", param); XmlRpcCall(requestingAgentID, "groups.addGroupNotice", param);
} }
#endregion #endregion
#region GroupSessionTracking #region GroupSessionTracking

View File

@ -48,7 +48,7 @@ using OpenSim.Tests.Common.Mock;
namespace OpenSim.Region.OptionalModules.World.NPC.Tests namespace OpenSim.Region.OptionalModules.World.NPC.Tests
{ {
[TestFixture] [TestFixture]
public class NPCModuleTests public class NPCModuleTests : OpenSimTestCase
{ {
private TestScene m_scene; private TestScene m_scene;
private AvatarFactoryModule m_afMod; private AvatarFactoryModule m_afMod;

View File

@ -32,13 +32,14 @@ using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Physics.Manager; using OpenSim.Region.Physics.Manager;
using OpenSim.Region.Physics.OdePlugin; using OpenSim.Region.Physics.OdePlugin;
using OpenSim.Tests.Common;
using log4net; using log4net;
using System.Reflection; using System.Reflection;
namespace OpenSim.Region.Physics.OdePlugin.Tests namespace OpenSim.Region.Physics.OdePlugin.Tests
{ {
[TestFixture] [TestFixture]
public class ODETestClass public class ODETestClass : OpenSimTestCase
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@ -39,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
/// The generated C# code is compared against the expected C# code. /// The generated C# code is compared against the expected C# code.
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class CSCodeGeneratorTest public class CSCodeGeneratorTest : OpenSimTestCase
{ {
[Test] [Test]
public void TestDefaultState() public void TestDefaultState()

View File

@ -41,7 +41,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
/// the LSL source. /// the LSL source.
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class CompilerTest public class CompilerTest : OpenSimTestCase
{ {
private string m_testDir; private string m_testDir;
private CSharpCodeProvider m_CSCodeProvider; private CSharpCodeProvider m_CSCodeProvider;

View File

@ -51,7 +51,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
/// Tests for inventory functions in LSL /// Tests for inventory functions in LSL
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class LSL_ApiInventoryTests public class LSL_ApiInventoryTests : OpenSimTestCase
{ {
protected Scene m_scene; protected Scene m_scene;
protected XEngine.XEngine m_engine; protected XEngine.XEngine m_engine;

View File

@ -56,7 +56,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
/// OpenSim.Region.Framework.Scenes.Tests.SceneObjectLinkingTests. /// OpenSim.Region.Framework.Scenes.Tests.SceneObjectLinkingTests.
/// </remarks> /// </remarks>
[TestFixture] [TestFixture]
public class LSL_ApiLinkingTests public class LSL_ApiLinkingTests : OpenSimTestCase
{ {
protected Scene m_scene; protected Scene m_scene;
protected XEngine.XEngine m_engine; protected XEngine.XEngine m_engine;

View File

@ -46,7 +46,7 @@ using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
namespace OpenSim.Region.ScriptEngine.Shared.Tests namespace OpenSim.Region.ScriptEngine.Shared.Tests
{ {
[TestFixture] [TestFixture]
public class LSL_ApiListTests public class LSL_ApiListTests : OpenSimTestCase
{ {
private LSL_Api m_lslApi; private LSL_Api m_lslApi;

View File

@ -33,7 +33,7 @@ using OpenSim.Region.ScriptEngine.Shared;
namespace OpenSim.Region.ScriptEngine.Shared.Tests namespace OpenSim.Region.ScriptEngine.Shared.Tests
{ {
[TestFixture] [TestFixture]
public class LSL_TypesTestLSLFloat public class LSL_TypesTestLSLFloat : OpenSimTestCase
{ {
// Used for testing equality of two floats. // Used for testing equality of two floats.
private double _lowPrecisionTolerance = 0.000001; private double _lowPrecisionTolerance = 0.000001;

View File

@ -33,7 +33,7 @@ using OpenSim.Region.ScriptEngine.Shared;
namespace OpenSim.Region.ScriptEngine.Shared.Tests namespace OpenSim.Region.ScriptEngine.Shared.Tests
{ {
[TestFixture] [TestFixture]
public class LSL_TypesTestLSLInteger public class LSL_TypesTestLSLInteger : OpenSimTestCase
{ {
private Dictionary<double, int> m_doubleIntSet; private Dictionary<double, int> m_doubleIntSet;
private Dictionary<string, int> m_stringIntSet; private Dictionary<string, int> m_stringIntSet;

View File

@ -33,7 +33,7 @@ using OpenSim.Region.ScriptEngine.Shared;
namespace OpenSim.Region.ScriptEngine.Shared.Tests namespace OpenSim.Region.ScriptEngine.Shared.Tests
{ {
[TestFixture] [TestFixture]
public class LSL_TypesTestLSLString public class LSL_TypesTestLSLString : OpenSimTestCase
{ {
private Dictionary<double, string> m_doubleStringSet; private Dictionary<double, string> m_doubleStringSet;

View File

@ -36,7 +36,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
/// Tests the LSL_Types.list class. /// Tests the LSL_Types.list class.
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class LSL_TypesTestList public class LSL_TypesTestList : OpenSimTestCase
{ {
/// <summary> /// <summary>
/// Tests concatenating a string to a list. /// Tests concatenating a string to a list.

View File

@ -36,7 +36,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
/// Tests for Vector3 /// Tests for Vector3
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class LSL_TypesTestVector3 public class LSL_TypesTestVector3 : OpenSimTestCase
{ {
[Test] [Test]
public void TestDotProduct() public void TestDotProduct()

View File

@ -51,7 +51,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
/// Tests for OSSL_Api /// Tests for OSSL_Api
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class OSSL_ApiAppearanceTest public class OSSL_ApiAppearanceTest : OpenSimTestCase
{ {
protected Scene m_scene; protected Scene m_scene;
protected XEngine.XEngine m_engine; protected XEngine.XEngine m_engine;

View File

@ -44,7 +44,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests
/// XEngine tests. /// XEngine tests.
/// </summary> /// </summary>
[TestFixture] [TestFixture]
public class XEngineTest public class XEngineTest : OpenSimTestCase
{ {
private TestScene m_scene; private TestScene m_scene;
private XEngine m_xEngine; private XEngine m_xEngine;

View File

@ -26,12 +26,15 @@
*/ */
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using log4net; using log4net;
using Mono.Addins; using Mono.Addins;
using Nini.Config; using Nini.Config;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Data;
using OpenSim.Data.Null;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
@ -44,6 +47,8 @@ namespace OpenSim.Tests.Common.Mock
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
IXGroupData m_data = new NullXGroupData(null, null);
public string Name public string Name
{ {
get { return "MockGroupsServicesConnector"; } get { return "MockGroupsServicesConnector"; }
@ -84,8 +89,34 @@ namespace OpenSim.Tests.Common.Mock
int membershipFee, bool openEnrollment, bool allowPublish, int membershipFee, bool openEnrollment, bool allowPublish,
bool maturePublish, UUID founderID) bool maturePublish, UUID founderID)
{ {
XGroup group = new XGroup()
{
groupID = UUID.Random(),
ownerRoleID = UUID.Random(),
name = name,
charter = charter,
showInList = showInList,
insigniaID = insigniaID,
membershipFee = membershipFee,
openEnrollment = openEnrollment,
allowPublish = allowPublish,
maturePublish = maturePublish,
founderID = founderID,
everyonePowers = (ulong)XmlRpcGroupsServicesConnectorModule.DefaultEveryonePowers,
ownersPowers = (ulong)XmlRpcGroupsServicesConnectorModule.DefaultOwnerPowers
};
if (m_data.StoreGroup(group))
{
m_log.DebugFormat("[MOCK GROUPS SERVICES CONNECTOR]: Created group {0} {1}", group.name, group.groupID);
return group.groupID;
}
else
{
m_log.ErrorFormat("[MOCK GROUPS SERVICES CONNECTOR]: Failed to create group {0}", name);
return UUID.Zero; return UUID.Zero;
} }
}
public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList,
UUID insigniaID, int membershipFee, bool openEnrollment, UUID insigniaID, int membershipFee, bool openEnrollment,
@ -107,9 +138,49 @@ namespace OpenSim.Tests.Common.Mock
{ {
} }
public GroupRecord GetGroupRecord(UUID requestingAgentID, UUID GroupID, string GroupName) public GroupRecord GetGroupRecord(UUID requestingAgentID, UUID groupID, string groupName)
{ {
m_log.DebugFormat(
"[MOCK GROUPS SERVICES CONNECTOR]: Processing GetGroupRecord() for groupID {0}, name {1}",
groupID, groupName);
XGroup[] groups;
string field, val;
if (groupID != UUID.Zero)
{
field = "groupID";
val = groupID.ToString();
}
else
{
field = "name";
val = groupName;
}
groups = m_data.GetGroups(field, val);
if (groups.Length == 0)
return null; return null;
XGroup xg = groups[0];
GroupRecord gr = new GroupRecord()
{
GroupID = xg.groupID,
GroupName = xg.name,
AllowPublish = xg.allowPublish,
MaturePublish = xg.maturePublish,
Charter = xg.charter,
FounderID = xg.founderID,
// FIXME: group picture storage location unknown
MembershipFee = xg.membershipFee,
OpenEnrollment = xg.openEnrollment,
OwnerRoleID = xg.ownerRoleID,
ShowInList = xg.showInList
};
return gr;
} }
public GroupProfileData GetMemberGroupProfile(UUID requestingAgentID, UUID GroupID, UUID AgentID) public GroupProfileData GetMemberGroupProfile(UUID requestingAgentID, UUID GroupID, UUID AgentID)

View File

@ -33,10 +33,11 @@ using log4net;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Data; using OpenSim.Data;
using OpenSim.Data.Null;
namespace OpenSim.Tests.Common.Mock namespace OpenSim.Tests.Common.Mock
{ {
public class TestXInventoryDataPlugin : IXInventoryData public class TestXInventoryDataPlugin : NullGenericDataHandler, IXInventoryData
{ {
private Dictionary<UUID, XInventoryFolder> m_allFolders = new Dictionary<UUID, XInventoryFolder>(); private Dictionary<UUID, XInventoryFolder> m_allFolders = new Dictionary<UUID, XInventoryFolder>();
private Dictionary<UUID, XInventoryItem> m_allItems = new Dictionary<UUID, XInventoryItem>(); private Dictionary<UUID, XInventoryItem> m_allItems = new Dictionary<UUID, XInventoryItem>();
@ -58,28 +59,6 @@ namespace OpenSim.Tests.Common.Mock
return origFolders.Select(f => f.Clone()).ToArray(); return origFolders.Select(f => f.Clone()).ToArray();
} }
private List<T> Get<T>(string[] fields, string[] vals, List<T> inputEntities)
{
List<T> entities = inputEntities;
for (int i = 0; i < fields.Length; i++)
{
entities
= entities.Where(
e =>
{
FieldInfo fi = typeof(T).GetField(fields[i]);
if (fi == null)
throw new NotImplementedException(string.Format("No field {0} for val {1}", fields[i], vals[i]));
return fi.GetValue(e).ToString() == vals[i];
}
).ToList();
}
return entities;
}
public bool StoreFolder(XInventoryFolder folder) public bool StoreFolder(XInventoryFolder folder)
{ {
m_allFolders[folder.folderID] = folder.Clone(); m_allFolders[folder.folderID] = folder.Clone();

View File

@ -29,11 +29,12 @@ using System.IO;
using Nini.Config; using Nini.Config;
using NUnit.Framework; using NUnit.Framework;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Tests.Common;
namespace OpenSim.Tests namespace OpenSim.Tests
{ {
[TestFixture] [TestFixture]
public class ConfigurationLoaderTests public class ConfigurationLoaderTests : OpenSimTestCase
{ {
private const string m_testSubdirectory = "test"; private const string m_testSubdirectory = "test";
private string m_basePath; private string m_basePath;

View File

@ -58,7 +58,7 @@ namespace OpenSim.Tests.Performance
/// earlier tests. /// earlier tests.
/// </remarks> /// </remarks>
[TestFixture] [TestFixture]
public class NPCPerformanceTests public class NPCPerformanceTests : OpenSimTestCase
{ {
private TestScene scene; private TestScene scene;
private AvatarFactoryModule afm; private AvatarFactoryModule afm;

View File

@ -47,7 +47,7 @@ namespace OpenSim.Tests.Performance
/// earlier tests. /// earlier tests.
/// </remarks> /// </remarks>
[TestFixture] [TestFixture]
public class ObjectPerformanceTests public class ObjectPerformanceTests : OpenSimTestCase
{ {
[TearDown] [TearDown]
public void TearDown() public void TearDown()

View File

@ -53,7 +53,7 @@ namespace OpenSim.Tests.Performance
/// earlier tests. /// earlier tests.
/// </remarks> /// </remarks>
[TestFixture] [TestFixture]
public class ScriptPerformanceTests public class ScriptPerformanceTests : OpenSimTestCase
{ {
private TestScene m_scene; private TestScene m_scene;
private XEngine m_xEngine; private XEngine m_xEngine;

View File

@ -364,6 +364,12 @@
; alert_uri = "http://myappserver.net/my_handler/" ; alert_uri = "http://myappserver.net/my_handler/"
[EstateManagement]
; If false, then block any region restart requests from the client even if they are otherwise valid.
; Default is true
AllowRegionRestartFromClient = true
[SMTP] [SMTP]
enabled = false enabled = false
@ -1582,8 +1588,7 @@
; If true, then the basic packet objects used to receive data are also recycled, not just the LLUDP packets. ; If true, then the basic packet objects used to receive data are also recycled, not just the LLUDP packets.
; This reduces data churn ; This reduces data churn
; This setting is currently experimental and defaults to false. RecycleBaseUDPPackets = true
RecycleBaseUDPPackets = false;
[InterestManagement] [InterestManagement]

View File

@ -1799,6 +1799,7 @@
<ReferencePath>../../../bin/</ReferencePath> <ReferencePath>../../../bin/</ReferencePath>
<Reference name="System"/> <Reference name="System"/>
<Reference name="System.Core"/>
<Reference name="System.Xml"/> <Reference name="System.Xml"/>
<Reference name="OpenSim.Data"/> <Reference name="OpenSim.Data"/>
<Reference name="OpenMetaverseTypes" path="../../../bin/"/> <Reference name="OpenMetaverseTypes" path="../../../bin/"/>
@ -2807,12 +2808,13 @@
<Reference name="nunit.framework" path="../../../bin/"/> <Reference name="nunit.framework" path="../../../bin/"/>
<Reference name="OpenMetaverse" path="../../../bin/"/> <Reference name="OpenMetaverse" path="../../../bin/"/>
<Reference name="OpenMetaverseTypes" path="../../../bin/"/> <Reference name="OpenMetaverseTypes" path="../../../bin/"/>
<Reference name="OpenSim.Data"/>
<Reference name="OpenSim.Data.Null"/>
<Reference name="OpenSim.Framework"/> <Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Communications"/> <Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Framework.Console"/> <Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Framework.Servers"/> <Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Servers.HttpServer"/> <Reference name="OpenSim.Framework.Servers.HttpServer"/>
<Reference name="OpenSim.Data"/>
<Reference name="OpenSim.Services.Interfaces"/> <Reference name="OpenSim.Services.Interfaces"/>
<Reference name="OpenSim.Server.Base"/> <Reference name="OpenSim.Server.Base"/>
<Reference name="OpenSim.Region.Framework"/> <Reference name="OpenSim.Region.Framework"/>
@ -2838,10 +2840,11 @@
</Configuration> </Configuration>
<ReferencePath>../../bin/</ReferencePath> <ReferencePath>../../bin/</ReferencePath>
<Reference name="OpenSim.Framework"/>
<Reference name="Nini" path="../../bin/"/> <Reference name="Nini" path="../../bin/"/>
<Reference name="nunit.framework" path="../../bin/"/> <Reference name="nunit.framework" path="../../bin/"/>
<Reference name="OpenSim"/> <Reference name="OpenSim"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Tests.Common"/>
<Files> <Files>
<Match pattern="*.cs" recurse="false"/> <Match pattern="*.cs" recurse="false"/>
</Files> </Files>
@ -3104,6 +3107,7 @@
<Reference name="OpenSim.Framework.Servers.HttpServer"/> <Reference name="OpenSim.Framework.Servers.HttpServer"/>
<Reference name="OpenSim.Region.Framework"/> <Reference name="OpenSim.Region.Framework"/>
<Reference name="OpenSim.Region.CoreModules"/> <Reference name="OpenSim.Region.CoreModules"/>
<Reference name="OpenSim.Region.OptionalModules"/>
<Reference name="OpenSim.Region.Physics.Manager"/> <Reference name="OpenSim.Region.Physics.Manager"/>
<Reference name="OpenSim.Region.ScriptEngine.Shared"/> <Reference name="OpenSim.Region.ScriptEngine.Shared"/>
<Reference name="OpenSim.Region.ScriptEngine.XEngine"/> <Reference name="OpenSim.Region.ScriptEngine.XEngine"/>
@ -3414,6 +3418,7 @@
<Reference name="OpenSim.Framework.Console"/> <Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Region.Physics.Manager"/> <Reference name="OpenSim.Region.Physics.Manager"/>
<Reference name="OpenSim.Region.Physics.OdePlugin" path="../../../../../bin/Physics/"/> <Reference name="OpenSim.Region.Physics.OdePlugin" path="../../../../../bin/Physics/"/>
<Reference name="OpenSim.Tests.Common"/>
<Reference name="Ode.NET" path="../../../../../bin/"/> <Reference name="Ode.NET" path="../../../../../bin/"/>
<Reference name="nunit.framework" path="../../../../../bin/"/> <Reference name="nunit.framework" path="../../../../../bin/"/>
<Reference name="log4net" path="../../../../../bin/"/> <Reference name="log4net" path="../../../../../bin/"/>