diff options
-rw-r--r-- | OpenSim/Data/IRegionData.cs | 3 | ||||
-rw-r--r-- | OpenSim/Services/GridService/GridService.cs | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Data/IRegionData.cs b/OpenSim/Data/IRegionData.cs index b8de1d8..41c74f2 100644 --- a/OpenSim/Data/IRegionData.cs +++ b/OpenSim/Data/IRegionData.cs | |||
@@ -70,6 +70,7 @@ namespace OpenSim.Data | |||
70 | DefaultRegion = 1, // Used for new Rez. Random if multiple defined | 70 | DefaultRegion = 1, // Used for new Rez. Random if multiple defined |
71 | FallbackRegion = 2, // Regions we redirect to when the destination is down | 71 | FallbackRegion = 2, // Regions we redirect to when the destination is down |
72 | RegionOnline = 4, // Set when a region comes online, unset when it unregisters and DeleteOnUnregister is false | 72 | RegionOnline = 4, // Set when a region comes online, unset when it unregisters and DeleteOnUnregister is false |
73 | NoDirectLogin = 8 // Region unavailable for direct logins (by name) | 73 | NoDirectLogin = 8, // Region unavailable for direct logins (by name) |
74 | Persistent = 16 // Don't remove on unregister | ||
74 | } | 75 | } |
75 | } | 76 | } |
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 | |||
156 | public bool DeregisterRegion(UUID regionID) | 156 | public bool DeregisterRegion(UUID regionID) |
157 | { | 157 | { |
158 | m_log.DebugFormat("[GRID SERVICE]: Region {0} deregistered", regionID); | 158 | m_log.DebugFormat("[GRID SERVICE]: Region {0} deregistered", regionID); |
159 | if (!m_DeleteOnUnregister) | 159 | RegionData region = m_Database.Get(regionID, UUID.Zero); |
160 | { | 160 | if (region == null) |
161 | RegionData region = m_Database.Get(regionID, UUID.Zero); | 161 | return false; |
162 | if (region == null) | ||
163 | return false; | ||
164 | 162 | ||
165 | int flags = Convert.ToInt32(region.Data["flags"]); | 163 | int flags = Convert.ToInt32(region.Data["flags"]); |
164 | |||
165 | if (!m_DeleteOnUnregister || (flags & (int)OpenSim.Data.RegionFlags.Persistent) != 0) | ||
166 | { | ||
166 | flags &= ~(int)OpenSim.Data.RegionFlags.RegionOnline; | 167 | flags &= ~(int)OpenSim.Data.RegionFlags.RegionOnline; |
167 | region.Data["flags"] = flags.ToString(); | 168 | region.Data["flags"] = flags.ToString(); |
168 | region.Data["last_seen"] = Util.UnixTimeSinceEpoch(); | 169 | region.Data["last_seen"] = Util.UnixTimeSinceEpoch(); |