From 483377adaedefb12f19b3f843dbabfd7b545bf90 Mon Sep 17 00:00:00 2001
From: MW
Date: Fri, 16 Nov 2007 13:39:11 +0000
Subject: More cleaning up when deleting regions from a instance. NOTE:
IGridServices.DeregisterRegion() method needs implementing for grid mode.
---
.../Region/Communications/Local/LocalBackEndServices.cs | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Communications/Local/LocalBackEndServices.cs')
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
index 1e76813..5d4e702 100644
--- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.Communications.Local
public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
{
//Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering");
- if (!m_regions.ContainsKey((uint) regionInfo.RegionHandle))
+ if (!m_regions.ContainsKey( regionInfo.RegionHandle))
{
//Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle );
m_regions.Add(regionInfo.RegionHandle, regionInfo);
@@ -69,6 +69,20 @@ namespace OpenSim.Region.Communications.Local
return null;
}
+ public bool DeregisterRegion(RegionInfo regionInfo)
+ {
+ if (m_regions.ContainsKey(regionInfo.RegionHandle))
+ {
+ m_regions.Remove(regionInfo.RegionHandle);
+ if (m_regionListeners.ContainsKey(regionInfo.RegionHandle))
+ {
+ m_regionListeners.Remove(regionInfo.RegionHandle);
+ }
+ return true;
+ }
+ return false;
+ }
+
///
///
///
@@ -132,7 +146,6 @@ namespace OpenSim.Region.Communications.Local
map.Y = (ushort) regInfo.RegionLocY;
map.WaterHeight = (byte) regInfo.EstateSettings.waterHeight;
map.MapImageId = regInfo.EstateSettings.terrainImageID;
- //new LLUUID("00000000-0000-0000-9999-000000000007");
map.Agents = 1;
map.RegionFlags = 72458694;
map.Access = 13;
--
cgit v1.1