Add "Persistent" flag to regions table flags values
parent
e189b3056f
commit
9727e3d66b
|
@ -70,6 +70,7 @@ namespace OpenSim.Data
|
||||||
DefaultRegion = 1, // Used for new Rez. Random if multiple defined
|
DefaultRegion = 1, // Used for new Rez. Random if multiple defined
|
||||||
FallbackRegion = 2, // Regions we redirect to when the destination is down
|
FallbackRegion = 2, // Regions we redirect to when the destination is down
|
||||||
RegionOnline = 4, // Set when a region comes online, unset when it unregisters and DeleteOnUnregister is false
|
RegionOnline = 4, // Set when a region comes online, unset when it unregisters and DeleteOnUnregister is false
|
||||||
NoDirectLogin = 8 // Region unavailable for direct logins (by name)
|
NoDirectLogin = 8, // Region unavailable for direct logins (by name)
|
||||||
|
Persistent = 16 // Don't remove on unregister
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,13 +156,14 @@ namespace OpenSim.Services.GridService
|
||||||
public bool DeregisterRegion(UUID regionID)
|
public bool DeregisterRegion(UUID regionID)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[GRID SERVICE]: Region {0} deregistered", regionID);
|
m_log.DebugFormat("[GRID SERVICE]: Region {0} deregistered", regionID);
|
||||||
if (!m_DeleteOnUnregister)
|
|
||||||
{
|
|
||||||
RegionData region = m_Database.Get(regionID, UUID.Zero);
|
RegionData region = m_Database.Get(regionID, UUID.Zero);
|
||||||
if (region == null)
|
if (region == null)
|
||||||
return false;
|
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;
|
flags &= ~(int)OpenSim.Data.RegionFlags.RegionOnline;
|
||||||
region.Data["flags"] = flags.ToString();
|
region.Data["flags"] = flags.ToString();
|
||||||
region.Data["last_seen"] = Util.UnixTimeSinceEpoch();
|
region.Data["last_seen"] = Util.UnixTimeSinceEpoch();
|
||||||
|
|
Loading…
Reference in New Issue