diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/GridService/GridService.cs | 13 |
1 files changed, 7 insertions, 6 deletions
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(); |