Merge branch 'master' into careminster

avinationmerge
Melanie 2012-11-13 10:49:24 +00:00
commit af01a2320a
16 changed files with 99 additions and 82 deletions

View File

@ -314,73 +314,76 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
} }
} }
// XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name> // Disabled for now as it looks like http://opensimulator.org/mantis/view.php?id=6311 was fixed by fixes
// to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis // to inventory folder versioning allowing the viewer to move the received folder itself as happens on the
// of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously // LL grid. Doing it again server-side then wrongly does a second create and move
// done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here. // // XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name>
else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) // // to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis
{ // // of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously
UUID destinationFolderID = UUID.Zero; // // done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here.
// else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
if (im.binaryBucket != null && im.binaryBucket.Length >= 16) // {
{ // UUID destinationFolderID = UUID.Zero;
destinationFolderID = new UUID(im.binaryBucket, 0); //
} // if (im.binaryBucket != null && im.binaryBucket.Length >= 16)
// {
if (destinationFolderID != UUID.Zero) // destinationFolderID = new UUID(im.binaryBucket, 0);
{ // }
InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId); //
if (destinationFolder == null) // if (destinationFolderID != UUID.Zero)
{ // {
m_log.WarnFormat( // InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId);
"[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist", // if (destinationFolder == null)
client.Name, scene.Name, destinationFolderID); // {
// m_log.WarnFormat(
return; // "[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist",
} // client.Name, scene.Name, destinationFolderID);
//
IInventoryService invService = scene.InventoryService; // return;
// }
UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip //
// IInventoryService invService = scene.InventoryService;
InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); //
item = invService.GetItem(item); // UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip
InventoryFolderBase folder = null; //
UUID? previousParentFolderID = null; // InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId);
// item = invService.GetItem(item);
if (item != null) // It's an item // InventoryFolderBase folder = null;
{ // UUID? previousParentFolderID = null;
previousParentFolderID = item.Folder; //
item.Folder = destinationFolderID; // if (item != null) // It's an item
// {
invService.DeleteItems(item.Owner, new List<UUID>() { item.ID }); // previousParentFolderID = item.Folder;
scene.AddInventoryItem(client, item); // item.Folder = destinationFolderID;
} //
else // invService.DeleteItems(item.Owner, new List<UUID>() { item.ID });
{ // scene.AddInventoryItem(client, item);
folder = new InventoryFolderBase(inventoryID, client.AgentId); // }
folder = invService.GetFolder(folder); // else
// {
if (folder != null) // It's a folder // folder = new InventoryFolderBase(inventoryID, client.AgentId);
{ // folder = invService.GetFolder(folder);
previousParentFolderID = folder.ParentID; //
folder.ParentID = destinationFolderID; // if (folder != null) // It's a folder
invService.MoveFolder(folder); // {
} // previousParentFolderID = folder.ParentID;
} // folder.ParentID = destinationFolderID;
// invService.MoveFolder(folder);
// Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). // }
if (previousParentFolderID != null) // }
{ //
InventoryFolderBase previousParentFolder // // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code).
= new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId); // if (previousParentFolderID != null)
previousParentFolder = invService.GetFolder(previousParentFolder); // {
scene.SendInventoryUpdate(client, previousParentFolder, true, true); // InventoryFolderBase previousParentFolder
// = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId);
scene.SendInventoryUpdate(client, destinationFolder, true, true); // previousParentFolder = invService.GetFolder(previousParentFolder);
} // scene.SendInventoryUpdate(client, previousParentFolder, true, true);
} //
} // scene.SendInventoryUpdate(client, destinationFolder, true, true);
// }
// }
// }
else if ( else if (
im.dialog == (byte)InstantMessageDialog.InventoryDeclined im.dialog == (byte)InstantMessageDialog.InventoryDeclined
|| im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined)

View File

@ -31,6 +31,7 @@ using System.Reflection;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
using OpenMetaverse; using OpenMetaverse;
using Mono.Addins;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.CoreModules.World.WorldMap; using OpenSim.Region.CoreModules.World.WorldMap;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
@ -39,6 +40,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
namespace OpenSim.Region.CoreModules.Hypergrid namespace OpenSim.Region.CoreModules.Hypergrid
{ {
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGWorldMapModule")]
public class HGWorldMapModule : WorldMapModule public class HGWorldMapModule : WorldMapModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@ -8,15 +8,6 @@
</Dependencies> </Dependencies>
<Extension path = "/OpenSim/RegionModules"> <Extension path = "/OpenSim/RegionModules">
<RegionModule id="LandManagementModule" type="OpenSim.Region.CoreModules.World.Land.LandManagementModule" />
<RegionModule id="DwellModule" type="OpenSim.Region.CoreModules.World.Land.DwellModule" />
<RegionModule id="PrimCountModule" type="OpenSim.Region.CoreModules.World.Land.PrimCountModule" />
<RegionModule id="ExportSerialisationModule" type="OpenSim.Region.CoreModules.World.Serialiser.SerialiserModule" />
<RegionModule id="ArchiverModule" type="OpenSim.Region.CoreModules.World.Archiver.ArchiverModule" />
<RegionModule id="TerrainModule" type="OpenSim.Region.CoreModules.World.Terrain.TerrainModule" />
<RegionModule id="WorldMapModule" type="OpenSim.Region.CoreModules.World.WorldMap.WorldMapModule" />
<RegionModule id="Warp3DImageModule" type="OpenSim.Region.CoreModules.World.Warp3DMap.Warp3DImageModule" />
<RegionModule id="HGWorldMapModule" type="OpenSim.Region.CoreModules.Hypergrid.HGWorldMapModule" />
<RegionModule id="UrlModule" type="OpenSim.Region.CoreModules.Scripting.LSLHttp.UrlModule" /> <RegionModule id="UrlModule" type="OpenSim.Region.CoreModules.Scripting.LSLHttp.UrlModule" />
<RegionModule id="Chat" type="OpenSim.Region.CoreModules.Avatar.Chat.ChatModule" /> <RegionModule id="Chat" type="OpenSim.Region.CoreModules.Avatar.Chat.ChatModule" />
<RegionModule id="FriendsModule" type="OpenSim.Region.CoreModules.Avatar.Friends.FriendsModule" /> <RegionModule id="FriendsModule" type="OpenSim.Region.CoreModules.Avatar.Friends.FriendsModule" />
@ -33,8 +24,6 @@
<RegionModule id="CenomeMemoryAssetCache" type="OpenSim.Region.CoreModules.Asset.CenomeMemoryAssetCache"/> <RegionModule id="CenomeMemoryAssetCache" type="OpenSim.Region.CoreModules.Asset.CenomeMemoryAssetCache"/>
<RegionModule id="LibraryModule" type="OpenSim.Region.CoreModules.Framework.Library.LibraryModule"/> <RegionModule id="LibraryModule" type="OpenSim.Region.CoreModules.Framework.Library.LibraryModule"/>
<RegionModule id="SunModule" type="OpenSim.Region.CoreModules.SunModule"/> <RegionModule id="SunModule" type="OpenSim.Region.CoreModules.SunModule"/>
<RegionModule id="WindModule" type="OpenSim.Region.CoreModules.WindModule"/>
<RegionModule id="MapSearchModule" type="OpenSim.Region.CoreModules.World.WorldMap.MapSearchModule"/>
<RegionModule id="VegetationModule" type="OpenSim.Region.CoreModules.Avatar.Vegetation.VegetationModule"/> <RegionModule id="VegetationModule" type="OpenSim.Region.CoreModules.Avatar.Vegetation.VegetationModule"/>
<RegionModule id="IPBanModule" type="OpenSim.Region.CoreModules.Agent.IPBan.IPBanModule"/> <RegionModule id="IPBanModule" type="OpenSim.Region.CoreModules.Agent.IPBan.IPBanModule"/>
<RegionModule id="J2KDecoderModule" type="OpenSim.Region.CoreModules.Agent.TextureSender.J2KDecoderModule"/> <RegionModule id="J2KDecoderModule" type="OpenSim.Region.CoreModules.Agent.TextureSender.J2KDecoderModule"/>
@ -84,9 +73,5 @@
</Extension> </Extension>
<Extension path = "/OpenSim/WindModule">
<WindModel id="ConfigurableWind" type="OpenSim.Region.CoreModules.World.Wind.Plugins.ConfigurableWind" />
<WindModel id="SimpleRandomWind" type="OpenSim.Region.CoreModules.World.Wind.Plugins.SimpleRandomWind" />
</Extension>
</Addin> </Addin>

View File

@ -32,6 +32,7 @@ using System.Reflection;
using log4net; using log4net;
using NDesk.Options; using NDesk.Options;
using Nini.Config; using Nini.Config;
using Mono.Addins;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
@ -42,6 +43,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
/// <summary> /// <summary>
/// This module loads and saves OpenSimulator region archives /// This module loads and saves OpenSimulator region archives
/// </summary> /// </summary>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ArchiverModule")]
public class ArchiverModule : INonSharedRegionModule, IRegionArchiverModule public class ArchiverModule : INonSharedRegionModule, IRegionArchiverModule
{ {
private static readonly ILog m_log = private static readonly ILog m_log =

View File

@ -36,6 +36,7 @@ using Nini.Config;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.StructuredData; using OpenMetaverse.StructuredData;
using OpenMetaverse.Messages.Linden; using OpenMetaverse.Messages.Linden;
using Mono.Addins;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Capabilities; using OpenSim.Framework.Capabilities;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
@ -51,6 +52,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
namespace OpenSim.Region.CoreModules.World.Land namespace OpenSim.Region.CoreModules.World.Land
{ {
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DwellModule")]
public class DwellModule : IDwellModule, INonSharedRegionModule public class DwellModule : IDwellModule, INonSharedRegionModule
{ {
private Scene m_scene; private Scene m_scene;

View File

@ -36,6 +36,7 @@ using Nini.Config;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.StructuredData; using OpenMetaverse.StructuredData;
using OpenMetaverse.Messages.Linden; using OpenMetaverse.Messages.Linden;
using Mono.Addins;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Capabilities; using OpenSim.Framework.Capabilities;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
@ -60,6 +61,7 @@ namespace OpenSim.Region.CoreModules.World.Land
public byte RegionAccess; public byte RegionAccess;
} }
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LandManagementModule")]
public class LandManagementModule : INonSharedRegionModule public class LandManagementModule : INonSharedRegionModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@ -34,6 +34,7 @@ using log4net;
using Nini.Config; using Nini.Config;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using Mono.Addins;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Services.Interfaces; using OpenSim.Services.Interfaces;
@ -49,6 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Land
public Dictionary <UUID, int> Users = new Dictionary <UUID, int>(); public Dictionary <UUID, int> Users = new Dictionary <UUID, int>();
} }
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "PrimCountModule")]
public class PrimCountModule : IPrimCountModule, INonSharedRegionModule public class PrimCountModule : IPrimCountModule, INonSharedRegionModule
{ {
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@ -32,6 +32,7 @@ using System.Reflection;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
using Mono.Addins;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Region.CoreModules.Framework.InterfaceCommander; using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
@ -41,6 +42,7 @@ using OpenSim.Region.Framework.Scenes.Serialization;
namespace OpenSim.Region.CoreModules.World.Serialiser namespace OpenSim.Region.CoreModules.World.Serialiser
{ {
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SerialiserModule")]
public class SerialiserModule : ISharedRegionModule, IRegionSerialiserModule public class SerialiserModule : ISharedRegionModule, IRegionSerialiserModule
{ {
private static readonly ILog m_log = private static readonly ILog m_log =

View File

@ -33,6 +33,7 @@ using System.Net;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
using OpenMetaverse; using OpenMetaverse;
using Mono.Addins;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.CoreModules.Framework.InterfaceCommander; using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
using OpenSim.Region.CoreModules.World.Terrain.FileLoaders; using OpenSim.Region.CoreModules.World.Terrain.FileLoaders;
@ -43,6 +44,7 @@ using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.CoreModules.World.Terrain namespace OpenSim.Region.CoreModules.World.Terrain
{ {
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "TerrainModule")]
public class TerrainModule : INonSharedRegionModule, ICommandableModule, ITerrainModule public class TerrainModule : INonSharedRegionModule, ICommandableModule, ITerrainModule
{ {
#region StandardTerrainEffects enum #region StandardTerrainEffects enum

View File

@ -35,6 +35,7 @@ using CSJ2K;
using Nini.Config; using Nini.Config;
using log4net; using log4net;
using Rednettle.Warp3D; using Rednettle.Warp3D;
using Mono.Addins;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.Imaging; using OpenMetaverse.Imaging;
using OpenMetaverse.Rendering; using OpenMetaverse.Rendering;
@ -49,6 +50,7 @@ using WarpRenderer = global::Warp3D.Warp3D;
namespace OpenSim.Region.CoreModules.World.Warp3DMap namespace OpenSim.Region.CoreModules.World.Warp3DMap
{ {
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "Warp3DImageModule")]
public class Warp3DImageModule : IMapImageGenerator, INonSharedRegionModule public class Warp3DImageModule : IMapImageGenerator, INonSharedRegionModule
{ {
private static readonly UUID TEXTURE_METADATA_MAGIC = new UUID("802dc0e0-f080-4931-8b57-d1be8611c4f3"); private static readonly UUID TEXTURE_METADATA_MAGIC = new UUID("802dc0e0-f080-4931-8b57-d1be8611c4f3");

View File

@ -31,12 +31,14 @@ using System.Reflection;
using log4net; using log4net;
using OpenMetaverse; using OpenMetaverse;
using Mono.Addins;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.CoreModules.World.Wind; using OpenSim.Region.CoreModules.World.Wind;
namespace OpenSim.Region.CoreModules.World.Wind.Plugins namespace OpenSim.Region.CoreModules.World.Wind.Plugins
{ {
[Extension(Path = "/OpenSim/WindModule", NodeName = "WindModel", Id = "ConfigurableWind")]
class ConfigurableWind : Mono.Addins.TypeExtensionNode, IWindModelPlugin class ConfigurableWind : Mono.Addins.TypeExtensionNode, IWindModelPlugin
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@ -29,11 +29,13 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using OpenMetaverse; using OpenMetaverse;
using Mono.Addins;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.CoreModules.World.Wind.Plugins namespace OpenSim.Region.CoreModules.World.Wind.Plugins
{ {
[Extension(Path = "/OpenSim/WindModule", NodeName = "WindModel", Id = "SimpleRandomWind")]
class SimpleRandomWind : Mono.Addins.TypeExtensionNode, IWindModelPlugin class SimpleRandomWind : Mono.Addins.TypeExtensionNode, IWindModelPlugin
{ {
private Vector2[] m_windSpeeds = new Vector2[16 * 16]; private Vector2[] m_windSpeeds = new Vector2[16 * 16];

View File

@ -40,6 +40,7 @@ using OpenSim.Region.CoreModules.World.Wind;
namespace OpenSim.Region.CoreModules namespace OpenSim.Region.CoreModules
{ {
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WindModule")]
public class WindModule : IWindModule public class WindModule : IWindModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@ -30,6 +30,7 @@ using System.Reflection;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
using OpenMetaverse; using OpenMetaverse;
using Mono.Addins;
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;
@ -38,6 +39,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
namespace OpenSim.Region.CoreModules.World.WorldMap namespace OpenSim.Region.CoreModules.World.WorldMap
{ {
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MapSearchModule")]
public class MapSearchModule : ISharedRegionModule public class MapSearchModule : ISharedRegionModule
{ {
private static readonly ILog m_log = private static readonly ILog m_log =

View File

@ -40,6 +40,7 @@ using Nini.Config;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.Imaging; using OpenMetaverse.Imaging;
using OpenMetaverse.StructuredData; using OpenMetaverse.StructuredData;
using Mono.Addins;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Capabilities; using OpenSim.Framework.Capabilities;
using OpenSim.Framework.Monitoring; using OpenSim.Framework.Monitoring;
@ -55,6 +56,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
namespace OpenSim.Region.CoreModules.World.WorldMap namespace OpenSim.Region.CoreModules.World.WorldMap
{ {
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WorldMapModule")]
public class WorldMapModule : INonSharedRegionModule, IWorldMapModule public class WorldMapModule : INonSharedRegionModule, IWorldMapModule
{ {
private static readonly ILog m_log = private static readonly ILog m_log =

View File

@ -350,6 +350,10 @@ namespace OpenSim.Tests.Common
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// If called directly, then all the modules must be shared modules. /// If called directly, then all the modules must be shared modules.
///
/// We are emulating here the normal calls made to setup region modules
/// (Initialise(), PostInitialise(), AddRegion, RegionLoaded()).
/// TODO: Need to reuse normal runtime module code.
/// </remarks> /// </remarks>
/// <param name="scenes"></param> /// <param name="scenes"></param>
/// <param name="config"></param> /// <param name="config"></param>