add a check to data_exposure option of DataSnapshot module

httptests
UbitUmarov 2018-05-26 03:35:56 +01:00
parent 8f0f102869
commit 7c50651cd1
1 changed files with 8 additions and 0 deletions

View File

@ -127,7 +127,15 @@ namespace OpenSim.Region.DataSnapshot
m_gridinfo.Add( m_gridinfo.Add(
"name", config.Configs["DataSnapshot"].GetString("gridname", "the lost continent of hippo")); "name", config.Configs["DataSnapshot"].GetString("gridname", "the lost continent of hippo"));
m_exposure_level = config.Configs["DataSnapshot"].GetString("data_exposure", m_exposure_level); m_exposure_level = config.Configs["DataSnapshot"].GetString("data_exposure", m_exposure_level);
m_exposure_level = m_exposure_level.ToLower();
if(m_exposure_level !="all" && m_exposure_level != "minimum")
{
m_log.ErrorFormat("[DATASNAPSHOT]: unknown data_exposure option: '{0}'. defaulting to minimum",m_exposure_level);
m_exposure_level = "minimum";
}
m_period = config.Configs["DataSnapshot"].GetInt("default_snapshot_period", m_period); m_period = config.Configs["DataSnapshot"].GetInt("default_snapshot_period", m_period);
m_maxStales = config.Configs["DataSnapshot"].GetInt("max_changes_before_update", m_maxStales); m_maxStales = config.Configs["DataSnapshot"].GetInt("max_changes_before_update", m_maxStales);
m_snapsDir = config.Configs["DataSnapshot"].GetString("snapshot_cache_directory", m_snapsDir); m_snapsDir = config.Configs["DataSnapshot"].GetString("snapshot_cache_directory", m_snapsDir);