diff options
author | Melanie | 2010-01-10 02:44:57 +0000 |
---|---|---|
committer | Melanie | 2010-01-10 02:44:57 +0000 |
commit | 9727e3d66b7324a2fa63e1cd95a77e2a82882723 (patch) | |
tree | 406ae0bf0b34d6812c33979449c993ca267d34a6 /OpenSim/Services | |
parent | Add last_seen field to regions table (diff) | |
download | opensim-SC_OLD-9727e3d66b7324a2fa63e1cd95a77e2a82882723.zip opensim-SC_OLD-9727e3d66b7324a2fa63e1cd95a77e2a82882723.tar.gz opensim-SC_OLD-9727e3d66b7324a2fa63e1cd95a77e2a82882723.tar.bz2 opensim-SC_OLD-9727e3d66b7324a2fa63e1cd95a77e2a82882723.tar.xz |
Add "Persistent" flag to regions table flags values
Diffstat (limited to 'OpenSim/Services')
-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(); |