From 9727e3d66b7324a2fa63e1cd95a77e2a82882723 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 10 Jan 2010 02:44:57 +0000 Subject: Add "Persistent" flag to regions table flags values --- OpenSim/Services/GridService/GridService.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'OpenSim/Services/GridService') diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 9bf986e..66bbff0 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs @@ -156,13 +156,14 @@ namespace OpenSim.Services.GridService public bool DeregisterRegion(UUID regionID) { m_log.DebugFormat("[GRID SERVICE]: Region {0} deregistered", regionID); - if (!m_DeleteOnUnregister) - { - RegionData region = m_Database.Get(regionID, UUID.Zero); - if (region == null) - return false; + RegionData region = m_Database.Get(regionID, UUID.Zero); + if (region == null) + return false; - int flags = Convert.ToInt32(region.Data["flags"]); + int flags = Convert.ToInt32(region.Data["flags"]); + + if (!m_DeleteOnUnregister || (flags & (int)OpenSim.Data.RegionFlags.Persistent) != 0) + { flags &= ~(int)OpenSim.Data.RegionFlags.RegionOnline; region.Data["flags"] = flags.ToString(); region.Data["last_seen"] = Util.UnixTimeSinceEpoch(); -- cgit v1.1