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 | |
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 '')
-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(); |