diff --git a/.nant/local.include b/.nant/local.include index 97c0c0fb56..b11c1e58c8 100644 --- a/.nant/local.include +++ b/.nant/local.include @@ -128,6 +128,11 @@ + + + + + @@ -201,6 +206,17 @@ + + + + + + + + + + + @@ -298,6 +314,11 @@ + + + + + @@ -314,6 +335,7 @@ + @@ -338,6 +360,7 @@ + diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 612c0d9935..6a76069fb5 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3589,129 +3589,142 @@ namespace OpenSim.Region.ClientStack.LindenUDP OpenSim.Framework.Lazy> objectUpdateBlocks = new OpenSim.Framework.Lazy>(); OpenSim.Framework.Lazy> compressedUpdateBlocks = new OpenSim.Framework.Lazy>(); OpenSim.Framework.Lazy> terseUpdateBlocks = new OpenSim.Framework.Lazy>(); + OpenSim.Framework.Lazy> terseAgentUpdateBlocks = new OpenSim.Framework.Lazy>(); if (maxUpdates <= 0) maxUpdates = Int32.MaxValue; int updatesThisCall = 0; - lock (m_entityUpdates.SyncRoot) + EntityUpdate update; + while (updatesThisCall < maxUpdates) { - EntityUpdate update; - while (updatesThisCall < maxUpdates && m_entityUpdates.TryDequeue(out update)) + lock (m_entityUpdates.SyncRoot) + if (!m_entityUpdates.TryDequeue(out update)) + break; + + if (update.Entity is SceneObjectPart) { - if (update.Entity is SceneObjectPart) - { - SceneObjectPart part = (SceneObjectPart)update.Entity; - if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId)) + SceneObjectPart part = (SceneObjectPart)update.Entity; + + // Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client + // will never receive an update after a prim kill. Even then, keeping the kill record may be a good + // safety measure. + // + // If a Linden Lab 1.23.5 client (and possibly later and earlier) receives an object update + // after a kill, it will keep displaying the deleted object until relog. OpenSim currently performs + // updates and kills on different threads with different scheduling strategies, hence this protection. + // + // This doesn't appear to apply to child prims - a client will happily ignore these updates + // after the root prim has been deleted. + if (m_killRecord.Contains(part.LocalId)) + continue; + if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId)) + continue; + + if (part.ParentGroup.IsDeleted) + continue; + + if (part.ParentGroup.IsAttachment) + { // Someone else's HUD, why are we getting these? + if (part.ParentGroup.OwnerID != AgentId && + part.ParentGroup.RootPart.Shape.State >= 30) + continue; + ScenePresence sp; + // Owner is not in the sim, don't update it to + // anyone + if (!m_scene.TryGetScenePresence(part.OwnerID, out sp)) continue; - if (m_killRecord.Contains(part.LocalId)) - continue; - - if (part.ParentGroup.IsDeleted) - continue; - - if (part.ParentGroup.IsAttachment) - { // Someone else's HUD, why are we getting these? - if (part.ParentGroup.OwnerID != AgentId && - part.ParentGroup.RootPart.Shape.State >= 30) - continue; - ScenePresence sp; - // Owner is not in the sim, don't update it to - // anyone - if (!m_scene.TryGetScenePresence(part.OwnerID, out sp)) - continue; - - List atts = sp.Attachments; - bool found = false; - foreach (SceneObjectGroup att in atts) - { - if (att == part.ParentGroup) - { - found = true; - break; - } - } - - // It's an attachment of a valid avatar, but - // doesn't seem to be attached, skip - if (!found) - continue; - } - - if (part.ParentGroup.IsAttachment && m_disableFacelights) + List atts = sp.Attachments; + bool found = false; + foreach (SceneObjectGroup att in atts) { - if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand && - part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.RightHand) + if (att == part.ParentGroup) { - part.Shape.LightEntry = false; + found = true; + break; } } + + // It's an attachment of a valid avatar, but + // doesn't seem to be attached, skip + if (!found) + continue; } - ++updatesThisCall; + if (part.ParentGroup.IsAttachment && m_disableFacelights) + { + if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand && + part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.RightHand) + { + part.Shape.LightEntry = false; + } + } + } - #region UpdateFlags to packet type conversion + ++updatesThisCall; - PrimUpdateFlags updateFlags = update.Flags; + #region UpdateFlags to packet type conversion - bool canUseCompressed = true; - bool canUseImproved = true; + PrimUpdateFlags updateFlags = update.Flags; - // Compressed object updates only make sense for LL primitives - if (!(update.Entity is SceneObjectPart)) + bool canUseCompressed = true; + bool canUseImproved = true; + + // Compressed object updates only make sense for LL primitives + if (!(update.Entity is SceneObjectPart)) + { + canUseCompressed = false; + } + + if (updateFlags.HasFlag(PrimUpdateFlags.FullUpdate)) + { + canUseCompressed = false; + canUseImproved = false; + } + else + { + if (updateFlags.HasFlag(PrimUpdateFlags.Velocity) || + updateFlags.HasFlag(PrimUpdateFlags.Acceleration) || + updateFlags.HasFlag(PrimUpdateFlags.CollisionPlane) || + updateFlags.HasFlag(PrimUpdateFlags.Joint)) { canUseCompressed = false; } - if (updateFlags.HasFlag(PrimUpdateFlags.FullUpdate)) + if (updateFlags.HasFlag(PrimUpdateFlags.PrimFlags) || + updateFlags.HasFlag(PrimUpdateFlags.ParentID) || + updateFlags.HasFlag(PrimUpdateFlags.Scale) || + updateFlags.HasFlag(PrimUpdateFlags.PrimData) || + updateFlags.HasFlag(PrimUpdateFlags.Text) || + updateFlags.HasFlag(PrimUpdateFlags.NameValue) || + updateFlags.HasFlag(PrimUpdateFlags.ExtraData) || + updateFlags.HasFlag(PrimUpdateFlags.TextureAnim) || + updateFlags.HasFlag(PrimUpdateFlags.Sound) || + updateFlags.HasFlag(PrimUpdateFlags.Particles) || + updateFlags.HasFlag(PrimUpdateFlags.Material) || + updateFlags.HasFlag(PrimUpdateFlags.ClickAction) || + updateFlags.HasFlag(PrimUpdateFlags.MediaURL) || + updateFlags.HasFlag(PrimUpdateFlags.Joint)) { - canUseCompressed = false; canUseImproved = false; } + } + + #endregion UpdateFlags to packet type conversion + + #region Block Construction + + // TODO: Remove this once we can build compressed updates + canUseCompressed = false; + + if (!canUseImproved && !canUseCompressed) + { + if (update.Entity is ScenePresence) + { + objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity)); + } else { - if (updateFlags.HasFlag(PrimUpdateFlags.Velocity) || - updateFlags.HasFlag(PrimUpdateFlags.Acceleration) || - updateFlags.HasFlag(PrimUpdateFlags.CollisionPlane) || - updateFlags.HasFlag(PrimUpdateFlags.Joint)) - { - canUseCompressed = false; - } - - if (updateFlags.HasFlag(PrimUpdateFlags.PrimFlags) || - updateFlags.HasFlag(PrimUpdateFlags.ParentID) || - updateFlags.HasFlag(PrimUpdateFlags.Scale) || - updateFlags.HasFlag(PrimUpdateFlags.PrimData) || - updateFlags.HasFlag(PrimUpdateFlags.Text) || - updateFlags.HasFlag(PrimUpdateFlags.NameValue) || - updateFlags.HasFlag(PrimUpdateFlags.ExtraData) || - updateFlags.HasFlag(PrimUpdateFlags.TextureAnim) || - updateFlags.HasFlag(PrimUpdateFlags.Sound) || - updateFlags.HasFlag(PrimUpdateFlags.Particles) || - updateFlags.HasFlag(PrimUpdateFlags.Material) || - updateFlags.HasFlag(PrimUpdateFlags.ClickAction) || - updateFlags.HasFlag(PrimUpdateFlags.MediaURL) || - updateFlags.HasFlag(PrimUpdateFlags.Joint)) - { - canUseImproved = false; - } - } - - #endregion UpdateFlags to packet type conversion - - #region Block Construction - - // TODO: Remove this once we can build compressed updates - canUseCompressed = false; - - if (!canUseImproved && !canUseCompressed) - { - if (update.Entity is ScenePresence) - { - objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity)); - } - else - { // if (update.Entity is SceneObjectPart && ((SceneObjectPart)update.Entity).IsAttachment) // { // SceneObjectPart sop = (SceneObjectPart)update.Entity; @@ -3740,71 +3753,90 @@ namespace OpenSim.Region.ClientStack.LindenUDP // } // else // { - objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); + objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); // } - } - } - else if (!canUseImproved) - { - compressedUpdateBlocks.Value.Add(CreateCompressedUpdateBlock((SceneObjectPart)update.Entity, updateFlags)); } + } + else if (!canUseImproved) + { + compressedUpdateBlocks.Value.Add(CreateCompressedUpdateBlock((SceneObjectPart)update.Entity, updateFlags)); + } + else + { + if (update.Entity is ScenePresence && ((ScenePresence)update.Entity).UUID == AgentId) + // Self updates go into a special list + terseAgentUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures))); else - { + // Everything else goes here terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures))); - } - - #endregion Block Construction } - #region Packet Sending + #endregion Block Construction + } + + #region Packet Sending - const float TIME_DILATION = 1.0f; - ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); + const float TIME_DILATION = 1.0f; + ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); + + if (terseAgentUpdateBlocks.IsValueCreated) + { + List blocks = terseAgentUpdateBlocks.Value; + + ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); + packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; + packet.RegionData.TimeDilation = timeDilation; + packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; + + for (int i = 0; i < blocks.Count; i++) + packet.ObjectData[i] = blocks[i]; + + OutPacket(packet, ThrottleOutPacketType.Unknown, true); + } + + if (objectUpdateBlocks.IsValueCreated) + { + List blocks = objectUpdateBlocks.Value; - if (objectUpdateBlocks.IsValueCreated) - { - List blocks = objectUpdateBlocks.Value; + ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); + packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; + packet.RegionData.TimeDilation = timeDilation; + packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[blocks.Count]; - ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); - packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; - packet.RegionData.TimeDilation = timeDilation; - packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[blocks.Count]; + for (int i = 0; i < blocks.Count; i++) + packet.ObjectData[i] = blocks[i]; - for (int i = 0; i < blocks.Count; i++) - packet.ObjectData[i] = blocks[i]; + OutPacket(packet, ThrottleOutPacketType.Task, true); + } - OutPacket(packet, ThrottleOutPacketType.Task, true); - } + if (compressedUpdateBlocks.IsValueCreated) + { + List blocks = compressedUpdateBlocks.Value; - if (compressedUpdateBlocks.IsValueCreated) - { - List blocks = compressedUpdateBlocks.Value; + ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed); + packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; + packet.RegionData.TimeDilation = timeDilation; + packet.ObjectData = new ObjectUpdateCompressedPacket.ObjectDataBlock[blocks.Count]; - ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed); - packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; - packet.RegionData.TimeDilation = timeDilation; - packet.ObjectData = new ObjectUpdateCompressedPacket.ObjectDataBlock[blocks.Count]; + for (int i = 0; i < blocks.Count; i++) + packet.ObjectData[i] = blocks[i]; - for (int i = 0; i < blocks.Count; i++) - packet.ObjectData[i] = blocks[i]; + OutPacket(packet, ThrottleOutPacketType.Task, true); + } - OutPacket(packet, ThrottleOutPacketType.Task, true); - } + if (terseUpdateBlocks.IsValueCreated) + { + List blocks = terseUpdateBlocks.Value; - if (terseUpdateBlocks.IsValueCreated) - { - List blocks = terseUpdateBlocks.Value; + ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); + packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; + packet.RegionData.TimeDilation = timeDilation; + packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; - ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); - packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; - packet.RegionData.TimeDilation = timeDilation; - packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; + for (int i = 0; i < blocks.Count; i++) + packet.ObjectData[i] = blocks[i]; - for (int i = 0; i < blocks.Count; i++) - packet.ObjectData[i] = blocks[i]; - - OutPacket(packet, ThrottleOutPacketType.Task, true); - } + OutPacket(packet, ThrottleOutPacketType.Task, true); } #endregion Packet Sending diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs index 16e25e6f11..dfba0d6994 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs @@ -41,8 +41,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid { - public class RemoteGridServicesConnector : - GridServicesConnector, ISharedRegionModule, IGridService + public class RemoteGridServicesConnector : ISharedRegionModule, IGridService { private static readonly ILog m_log = LogManager.GetLogger( @@ -51,6 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid private bool m_Enabled = false; private IGridService m_LocalGridService; + private IGridService m_RemoteGridService; public RemoteGridServicesConnector() { @@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid get { return "RemoteGridServicesConnector"; } } - public override void Initialise(IConfigSource source) + public void Initialise(IConfigSource source) { IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) @@ -97,9 +97,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid return; } - base.Initialise(source); - m_LocalGridService = new LocalGridServicesConnector(source); + m_RemoteGridService = new GridServicesConnector(source); } public void PostInitialise() @@ -135,61 +134,61 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid #region IGridService - public override string RegisterRegion(UUID scopeID, GridRegion regionInfo) + public string RegisterRegion(UUID scopeID, GridRegion regionInfo) { string msg = m_LocalGridService.RegisterRegion(scopeID, regionInfo); if (msg == String.Empty) - return base.RegisterRegion(scopeID, regionInfo); + return m_RemoteGridService.RegisterRegion(scopeID, regionInfo); return msg; } - public override bool DeregisterRegion(UUID regionID) + public bool DeregisterRegion(UUID regionID) { if (m_LocalGridService.DeregisterRegion(regionID)) - return base.DeregisterRegion(regionID); + return m_RemoteGridService.DeregisterRegion(regionID); return false; } - public override List GetNeighbours(UUID scopeID, UUID regionID) + public List GetNeighbours(UUID scopeID, UUID regionID) { - return base.GetNeighbours(scopeID, regionID); + return m_RemoteGridService.GetNeighbours(scopeID, regionID); } - public override GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) + public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) { GridRegion rinfo = m_LocalGridService.GetRegionByUUID(scopeID, regionID); if (rinfo == null) - rinfo = base.GetRegionByUUID(scopeID, regionID); + rinfo = m_RemoteGridService.GetRegionByUUID(scopeID, regionID); return rinfo; } - public override GridRegion GetRegionByPosition(UUID scopeID, int x, int y) + public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) { GridRegion rinfo = m_LocalGridService.GetRegionByPosition(scopeID, x, y); if (rinfo == null) - rinfo = base.GetRegionByPosition(scopeID, x, y); + rinfo = m_RemoteGridService.GetRegionByPosition(scopeID, x, y); return rinfo; } - public override GridRegion GetRegionByName(UUID scopeID, string regionName) + public GridRegion GetRegionByName(UUID scopeID, string regionName) { GridRegion rinfo = m_LocalGridService.GetRegionByName(scopeID, regionName); if (rinfo == null) - rinfo = base.GetRegionByName(scopeID, regionName); + rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName); return rinfo; } - public override List GetRegionsByName(UUID scopeID, string name, int maxNumber) + public List GetRegionsByName(UUID scopeID, string name, int maxNumber) { List rinfo = m_LocalGridService.GetRegionsByName(scopeID, name, maxNumber); //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Local GetRegionsByName {0} found {1} regions", name, rinfo.Count); - List grinfo = base.GetRegionsByName(scopeID, name, maxNumber); + List grinfo = m_RemoteGridService.GetRegionsByName(scopeID, name, maxNumber); if (grinfo != null) { @@ -202,13 +201,79 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid return rinfo; } - // Let's not override GetRegionRange -- let's get them all from the grid server + public virtual List GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax) + { + List rinfo = m_LocalGridService.GetRegionRange(scopeID, xmin, xmax, ymin, ymax); + //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Local GetRegionRange {0} found {1} regions", name, rinfo.Count); + List grinfo = m_RemoteGridService.GetRegionRange(scopeID, xmin, xmax, ymin, ymax); - public override int GetRegionFlags(UUID scopeID, UUID regionID) + if (grinfo != null) + { + //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetRegionRange {0} found {1} regions", name, grinfo.Count); + foreach (GridRegion r in grinfo) + if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) + rinfo.Add(r); + } + + return rinfo; + } + + public List GetDefaultRegions(UUID scopeID) + { + List rinfo = m_LocalGridService.GetDefaultRegions(scopeID); + //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Local GetDefaultRegions {0} found {1} regions", name, rinfo.Count); + List grinfo = m_RemoteGridService.GetDefaultRegions(scopeID); + + if (grinfo != null) + { + //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetDefaultRegions {0} found {1} regions", name, grinfo.Count); + foreach (GridRegion r in grinfo) + if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) + rinfo.Add(r); + } + + return rinfo; + } + + public List GetFallbackRegions(UUID scopeID, int x, int y) + { + List rinfo = m_LocalGridService.GetFallbackRegions(scopeID, x, y); + //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Local GetFallbackRegions {0} found {1} regions", name, rinfo.Count); + List grinfo = m_RemoteGridService.GetFallbackRegions(scopeID, x, y); + + if (grinfo != null) + { + //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetFallbackRegions {0} found {1} regions", name, grinfo.Count); + foreach (GridRegion r in grinfo) + if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) + rinfo.Add(r); + } + + return rinfo; + } + + public List GetHyperlinks(UUID scopeID) + { + List rinfo = m_LocalGridService.GetHyperlinks(scopeID); + //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Local GetHyperlinks {0} found {1} regions", name, rinfo.Count); + List grinfo = m_RemoteGridService.GetHyperlinks(scopeID); + + if (grinfo != null) + { + //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetHyperlinks {0} found {1} regions", name, grinfo.Count); + foreach (GridRegion r in grinfo) + if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) + rinfo.Add(r); + } + + return rinfo; + } + + public int GetRegionFlags(UUID scopeID, UUID regionID) { int flags = m_LocalGridService.GetRegionFlags(scopeID, regionID); if (flags == -1) - flags = base.GetRegionFlags(scopeID, regionID); + flags = m_RemoteGridService.GetRegionFlags(scopeID, regionID); return flags; } diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index d2c3afbeee..334dcb0f47 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs @@ -93,13 +93,13 @@ namespace OpenSim.Region.CoreModules.World.WorldMap } // try to fetch from GridServer - List regionInfos = m_scene.GridService.GetRegionsByName(UUID.Zero, mapName, 20); + List regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); if (regionInfos == null) { m_log.Warn("[MAPSEARCHMODULE]: RequestNamedRegions returned null. Old gridserver?"); // service wasn't available; maybe still an old GridServer. Try the old API, though it will return only one region regionInfos = new List(); - GridRegion info = m_scene.GridService.GetRegionByName(UUID.Zero, mapName); + GridRegion info = m_scene.GridService.GetRegionByName(m_scene.RegionInfo.ScopeID, mapName); if (info != null) regionInfos.Add(info); } diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 9869f4a4e1..e3ba1901f1 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -33,6 +33,7 @@ using System.Drawing.Imaging; using System.IO; using System.Net; using System.Reflection; +using System.Runtime.Remoting.Messaging; using System.Threading; using log4net; using Nini.Config; @@ -413,11 +414,13 @@ namespace OpenSim.Region.CoreModules.World.WorldMap } } + private int nAsyncRequests = 0; /// /// Processing thread main() loop for doing remote mapitem requests /// public void process() { + const int MAX_ASYNC_REQUESTS = 20; try { while (true) @@ -437,10 +440,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap dorequest = false; } - if (dorequest) + if (dorequest && !m_blacklistedregions.ContainsKey(st.regionhandle)) { - OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); - RequestMapItemsCompleted(response); + while (nAsyncRequests >= MAX_ASYNC_REQUESTS) // hit the break + Thread.Sleep(80); + + RequestMapItemsDelegate d = RequestMapItemsAsync; + d.BeginInvoke(st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle, RequestMapItemsCompleted, null); + //OSDMap response = RequestMapItemsAsync(st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); + //RequestMapItemsCompleted(response); + Interlocked.Increment(ref nAsyncRequests); } } @@ -469,8 +478,18 @@ namespace OpenSim.Region.CoreModules.World.WorldMap /// Sends the mapitem response to the IClientAPI /// /// The OSDMap Response for the mapitem - private void RequestMapItemsCompleted(OSDMap response) + private void RequestMapItemsCompleted(IAsyncResult iar) { + AsyncResult result = (AsyncResult)iar; + RequestMapItemsDelegate icon = (RequestMapItemsDelegate)result.AsyncDelegate; + + OSDMap response = (OSDMap)icon.EndInvoke(iar); + + Interlocked.Decrement(ref nAsyncRequests); + + if (!response.ContainsKey("requestID")) + return; + UUID requestID = response["requestID"].AsUUID(); if (requestID != UUID.Zero) @@ -538,6 +557,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap EnqueueMapItemRequest(st); } + private delegate OSDMap RequestMapItemsDelegate(UUID id, uint flags, + uint EstateID, bool godlike, uint itemtype, ulong regionhandle); /// /// Does the actual remote mapitem request /// This should be called from an asynchronous thread @@ -552,9 +573,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap /// passed in from packet /// Region we're looking up /// - private OSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags, + private OSDMap RequestMapItemsAsync(UUID id, uint flags, uint EstateID, bool godlike, uint itemtype, ulong regionhandle) { + string httpserver = ""; bool blacklisted = false; lock (m_blacklistedregions) { @@ -593,7 +615,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap if (!m_blacklistedregions.ContainsKey(regionhandle)) m_blacklistedregions.Add(regionhandle, Environment.TickCount); } - m_log.InfoFormat("[WORLD MAP]: Blacklisted region {0}", regionhandle.ToString()); + //m_log.InfoFormat("[WORLD MAP]: Blacklisted region {0}", regionhandle.ToString()); } } @@ -638,7 +660,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap os = mapitemsrequest.GetRequestStream(); os.Write(buffer, 0, buffer.Length); //Send it os.Close(); - //m_log.DebugFormat("[WORLD MAP]: Getting MapItems from Sim {0}", httpserver); + //m_log.DebugFormat("[WORLD MAP]: Getting MapItems from {0}", httpserver); } catch (WebException ex) { @@ -654,15 +676,22 @@ namespace OpenSim.Region.CoreModules.World.WorldMap return responseMap; } + catch + { + m_log.DebugFormat("[WORLD MAP]: RequestMapItems failed for {0}", httpserver); + responseMap["connect"] = OSD.FromBoolean(false); + return responseMap; + } string response_mapItems_reply = null; { // get the response + StreamReader sr = null; try { WebResponse webResponse = mapitemsrequest.GetResponse(); if (webResponse != null) { - StreamReader sr = new StreamReader(webResponse.GetResponseStream()); + sr = new StreamReader(webResponse.GetResponseStream()); response_mapItems_reply = sr.ReadToEnd().Trim(); } else @@ -683,6 +712,24 @@ namespace OpenSim.Region.CoreModules.World.WorldMap return responseMap; } + catch + { + m_log.DebugFormat("[WORLD MAP]: RequestMapItems failed for {0}", httpserver); + responseMap["connect"] = OSD.FromBoolean(false); + lock (m_blacklistedregions) + { + if (!m_blacklistedregions.ContainsKey(regionhandle)) + m_blacklistedregions.Add(regionhandle, Environment.TickCount); + } + + return responseMap; + } + finally + { + if (sr != null) + sr.Close(); + } + OSD rezResponse = null; try { @@ -691,14 +738,29 @@ namespace OpenSim.Region.CoreModules.World.WorldMap responseMap = (OSDMap)rezResponse; responseMap["requestID"] = OSD.FromUUID(requestID); } - catch (Exception) + catch (Exception ex) { - //m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message); + m_log.InfoFormat("[WORLD MAP]: exception on parse of RequestMapItems reply from {0}: {1}", httpserver, ex.Message); responseMap["connect"] = OSD.FromBoolean(false); + lock (m_blacklistedregions) + { + if (!m_blacklistedregions.ContainsKey(regionhandle)) + m_blacklistedregions.Add(regionhandle, Environment.TickCount); + } return responseMap; } } + + if (!responseMap.ContainsKey(itemtype.ToString())) // remote sim doesnt have the stated region handle + { + if (!m_blacklistedregions.ContainsKey(regionhandle)) + { + m_log.DebugFormat("[WORLD MAP]: Remote sim does not have the stated region. Blacklisting."); + m_blacklistedregions.Add(regionhandle, Environment.TickCount); + } + } + return responseMap; } diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs similarity index 95% rename from OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserTests.cs rename to OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs index b3b99f4922..39116b6615 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs @@ -43,13 +43,14 @@ using OpenSim.Tests.Common.Setup; namespace OpenSim.Region.Framework.Scenes.Tests { /// - /// Tests manipulation of scene objects by users. + /// Tests derez of scene objects by users. /// - /// + /// /// This is at a level above the SceneObjectBasicTests, which act on the scene directly. - /// FIXME: These tests are very incomplete - they only test for a few conditions. + /// TODO: These tests are very incomplete - they only test for a few conditions. + /// [TestFixture] - public class SceneObjectUserTests + public class SceneObjectDeRezTests { /// /// Test deleting an object from a scene. @@ -122,6 +123,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero); sogd.InventoryDeQueueAndDelete(); + // Object should still be in the scene. SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID)); } diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs new file mode 100644 index 0000000000..c78038f7a7 --- /dev/null +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs @@ -0,0 +1,87 @@ +/* + * 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.Reflection; +using Nini.Config; +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Framework.Communications; +using OpenSim.Region.CoreModules.Avatar.InstantMessage; +using OpenSim.Region.CoreModules.World.Permissions; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups; +using OpenSim.Tests.Common; +using OpenSim.Tests.Common.Mock; +using OpenSim.Tests.Common.Setup; + +namespace OpenSim.Region.Framework.Scenes.Tests +{ + [TestFixture] + public class SceneObjectUserGroupTests + { + /// + /// Test share with group object functionality + /// + /// This test is not yet fully implemented + [Test] + public void TestShareWithGroup() + { + TestHelper.InMethod(); +// log4net.Config.XmlConfigurator.Configure(); + + UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); + + TestScene scene = SceneSetupHelpers.SetupScene(); + IConfigSource configSource = new IniConfigSource(); + + IConfig startupConfig = configSource.AddConfig("Startup"); + startupConfig.Set("serverside_object_permissions", true); + + IConfig groupsConfig = configSource.AddConfig("Groups"); + groupsConfig.Set("Enabled", true); + groupsConfig.Set("Module", "GroupsModule"); + groupsConfig.Set("DebugEnabled", true); + + SceneSetupHelpers.SetupSceneModules( + scene, configSource, new object[] + { new PermissionsModule(), + new GroupsModule(), + new MockGroupsServicesConnector() }); + + TestClient client = SceneSetupHelpers.AddRootAgent(scene, userId); + + IGroupsModule groupsModule = scene.RequestModuleInterface(); + + groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); + } + } +} \ No newline at end of file diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index ccf52892dc..4aab87fb3c 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -163,9 +163,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (m_msgTransferModule == null) { m_groupsEnabled = false; - m_log.Error("[GROUPS]: Could not get MessageTransferModule"); - Close(); - return; + m_log.Warn("[GROUPS]: Could not get MessageTransferModule"); } } @@ -1299,7 +1297,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: MsgTo ({0}) is local, delivering directly", localClient.Name); localClient.SendInstantMessage(msg); } - else + else if (m_msgTransferModule != null) { if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: MsgTo ({0}) is not local, delivering via TransferModule", msgTo); m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Message Sent: {0}", success?"Succeeded":"Failed"); }); diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs index a046e094cd..5c779debc5 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs @@ -27,14 +27,12 @@ using System; using System.Collections.Generic; - using OpenMetaverse; - using OpenSim.Framework; namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { - interface IGroupsServicesConnector + public interface IGroupsServicesConnector { 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); diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs new file mode 100644 index 0000000000..bc55b04743 --- /dev/null +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs @@ -0,0 +1,65 @@ +/* + * 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.Reflection; +using Nini.Config; +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Framework.Communications; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Tests.Common; +using OpenSim.Tests.Common.Mock; +using OpenSim.Tests.Common.Setup; + +namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests +{ + /// + /// Basic groups module tests + /// + [TestFixture] + public class GroupsModuleTests + { + [Test] + public void TestBasic() + { + TestHelper.InMethod(); +// log4net.Config.XmlConfigurator.Configure(); + + TestScene scene = SceneSetupHelpers.SetupScene(); + IConfigSource configSource = new IniConfigSource(); + IConfig config = configSource.AddConfig("Groups"); + config.Set("Enabled", true); + config.Set("Module", "GroupsModule"); + config.Set("DebugEnabled", true); + SceneSetupHelpers.SetupSceneModules( + scene, configSource, new object[] { new MockGroupsServicesConnector() }); + } + } +} \ No newline at end of file diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index 1ac8478220..a1d9167c5a 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs @@ -147,7 +147,10 @@ namespace OpenSim.Services.Connectors.Hypergrid public UUID GetMapImage(UUID regionID, string imageURL, string storagePath) { if (m_AssetService == null) + { + m_log.DebugFormat("[GATEKEEPER SERVICE CONNECTOR]: No AssetService defined. Map tile not retrieved."); return m_HGMapImage; + } UUID mapTile = m_HGMapImage; string filename = string.Empty; @@ -167,8 +170,6 @@ namespace OpenSim.Services.Connectors.Hypergrid // !!! for now //info.RegionSettings.TerrainImageID = ass.FullID; - ass.Temporary = true; - ass.Local = true; ass.Data = imageData; m_AssetService.Store(ass); diff --git a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs new file mode 100644 index 0000000000..6fb9df1313 --- /dev/null +++ b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs @@ -0,0 +1,237 @@ +/* + * 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.Reflection; +using log4net; +using Mono.Addins; +using Nini.Config; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups; + +namespace OpenSim.Tests.Common.Mock +{ + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class MockGroupsServicesConnector : ISharedRegionModule, IGroupsServicesConnector + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + public string Name + { + get { return "MockGroupsServicesConnector"; } + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void Initialise(IConfigSource config) + { + } + + public void Close() + { + } + + public void AddRegion(Scene scene) + { + m_log.DebugFormat("[MOCK GROUPS SERVICES CONNECTOR]: Adding to region {0}", scene.RegionInfo.RegionName); + scene.RegisterModuleInterface(this); + } + + public void RemoveRegion(Scene scene) + { + } + + public void RegionLoaded(Scene scene) + { + } + + public void PostInitialise() + { + } + + public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, + int membershipFee, bool openEnrollment, bool allowPublish, + bool maturePublish, UUID founderID) + { + return UUID.Zero; + } + + public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, + UUID insigniaID, int membershipFee, bool openEnrollment, + bool allowPublish, bool maturePublish) + { + } + + public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, + string title, ulong powers) + { + } + + public void RemoveGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID) + { + } + + public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, + string title, ulong powers) + { + } + + public GroupRecord GetGroupRecord(UUID requestingAgentID, UUID GroupID, string GroupName) + { + return null; + } + + public GroupProfileData GetMemberGroupProfile(UUID requestingAgentID, UUID GroupID, UUID AgentID) + { + return default(GroupProfileData); + } + + public void SetAgentActiveGroup(UUID requestingAgentID, UUID AgentID, UUID GroupID) + { + } + + public void SetAgentActiveGroupRole(UUID requestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID) + { + } + + public void SetAgentGroupInfo(UUID requestingAgentID, UUID AgentID, UUID GroupID, bool AcceptNotices, bool ListInProfile) + { + } + + public void AddAgentToGroupInvite(UUID requestingAgentID, UUID inviteID, UUID groupID, UUID roleID, UUID agentID) + { + } + + public GroupInviteInfo GetAgentToGroupInvite(UUID requestingAgentID, UUID inviteID) + { + return null; + } + + public void RemoveAgentToGroupInvite(UUID requestingAgentID, UUID inviteID) + { + } + + public void AddAgentToGroup(UUID requestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID) + { + } + + public void RemoveAgentFromGroup(UUID requestingAgentID, UUID AgentID, UUID GroupID) + { + } + + public void AddAgentToGroupRole(UUID requestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID) + { + } + + public void RemoveAgentFromGroupRole(UUID requestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID) + { + } + + public List FindGroups(UUID requestingAgentID, string search) + { + return null; + } + + public GroupMembershipData GetAgentGroupMembership(UUID requestingAgentID, UUID AgentID, UUID GroupID) + { + return null; + } + + public GroupMembershipData GetAgentActiveMembership(UUID requestingAgentID, UUID AgentID) + { + return null; + } + + public List GetAgentGroupMemberships(UUID requestingAgentID, UUID AgentID) + { + return new List(); + } + + public List GetAgentGroupRoles(UUID requestingAgentID, UUID AgentID, UUID GroupID) + { + return null; + } + + public List GetGroupRoles(UUID requestingAgentID, UUID GroupID) + { + return null; + } + + public List GetGroupMembers(UUID requestingAgentID, UUID GroupID) + { + return null; + } + + public List GetGroupRoleMembers(UUID requestingAgentID, UUID GroupID) + { + return null; + } + + public List GetGroupNotices(UUID requestingAgentID, UUID GroupID) + { + return null; + } + + public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID) + { + return null; + } + + public void AddGroupNotice(UUID requestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket) + { + } + + public void ResetAgentGroupChatSessions(UUID agentID) + { + } + + public bool hasAgentBeenInvitedToGroupChatSession(UUID agentID, UUID groupID) + { + return false; + } + + public bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID) + { + return false; + } + + public void AgentDroppedFromGroupChatSession(UUID agentID, UUID groupID) + { + } + + public void AgentInvitedToGroupChatSession(UUID agentID, UUID groupID) + { + } + } +} \ No newline at end of file diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index 9d7733e465..8b1649635c 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs @@ -424,9 +424,12 @@ namespace OpenSim.Tests.Common.Setup foreach (IRegionModuleBase module in newModules) { module.AddRegion(scene); - module.RegionLoaded(scene); scene.AddRegionModule(module.Name, module); } + + // RegionLoaded is fired after all modules have been appropriately added to all scenes + foreach (IRegionModuleBase module in newModules) + module.RegionLoaded(scene); scene.SetModuleInterfaces(); } diff --git a/bin/ode.dll b/bin/ode.dll index 0fb161e3c5..f310358693 100644 Binary files a/bin/ode.dll and b/bin/ode.dll differ diff --git a/prebuild.xml b/prebuild.xml index a302d5ff4a..7dd7b67bd1 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -2765,6 +2765,7 @@ + @@ -2779,6 +2780,7 @@ + @@ -3006,6 +3008,62 @@ + + + + ../../../bin/ + + + + + ../../../bin/ + + + + ../../../bin/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3034,6 +3092,7 @@ +