aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/DataSnapshot/DataSnapshotManager.cs50
1 files changed, 32 insertions, 18 deletions
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
index 586b665..6af6574 100644
--- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
+++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
@@ -55,6 +55,7 @@ namespace OpenSim.Region.DataSnapshot
55 private List<String> m_disabledModules = new List<String>(); 55 private List<String> m_disabledModules = new List<String>();
56 private Dictionary<string, string> m_gridinfo = new Dictionary<string, string>(); 56 private Dictionary<string, string> m_gridinfo = new Dictionary<string, string>();
57 private string m_snapsDir = "DataSnapshot"; 57 private string m_snapsDir = "DataSnapshot";
58 private string m_exposure_level = "minimum";
58 59
59 //Lists of stuff we need 60 //Lists of stuff we need
60 private List<Scene> m_scenes = new List<Scene>(); 61 private List<Scene> m_scenes = new List<Scene>();
@@ -82,6 +83,15 @@ namespace OpenSim.Region.DataSnapshot
82 83
83 #endregion 84 #endregion
84 85
86 #region Properties
87
88 public string ExposureLevel
89 {
90 get { return m_exposure_level; }
91 }
92
93 #endregion
94
85 #region IRegionModule 95 #region IRegionModule
86 96
87 public void Close() {} 97 public void Close() {}
@@ -92,23 +102,24 @@ namespace OpenSim.Region.DataSnapshot
92 m_configLoaded = true; 102 m_configLoaded = true;
93 m_log.Info("[DATASNAPSHOT]: Loading configuration"); 103 m_log.Info("[DATASNAPSHOT]: Loading configuration");
94 //Read from the config for options 104 //Read from the config for options
95 lock (m_syncInit) 105 lock (m_syncInit)
96 { 106 {
97 try 107 try
98 { 108 {
99 m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled); 109 m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled);
100 if (config.Configs["Startup"].GetBoolean("gridmode", true)) 110 if (config.Configs["Startup"].GetBoolean("gridmode", true))
101 { 111 {
102 m_gridinfo.Add("gridserverURL", config.Configs["Network"].GetString("grid_server_url", "harbl")); 112 m_gridinfo.Add("gridserverURL", config.Configs["Network"].GetString("grid_server_url", "harbl"));
103 m_gridinfo.Add("userserverURL", config.Configs["Network"].GetString("user_server_url", "harbl")); 113 m_gridinfo.Add("userserverURL", config.Configs["Network"].GetString("user_server_url", "harbl"));
104 m_gridinfo.Add("assetserverURL", config.Configs["Network"].GetString("asset_server_url", "harbl")); 114 m_gridinfo.Add("assetserverURL", config.Configs["Network"].GetString("asset_server_url", "harbl"));
105 } 115 }
106 else 116 else
107 { 117 {
108 //Non gridmode stuff 118 //Non gridmode stuff
109 } 119 }
110 120
111 m_gridinfo.Add("Name", config.Configs["DataSnapshot"].GetString("gridname", "harbl")); 121 m_gridinfo.Add("Name", config.Configs["DataSnapshot"].GetString("gridname", "harbl"));
122 m_exposure_level = config.Configs["DataSnapshot"].GetString("data_exposure", m_exposure_level);
112 m_period = config.Configs["DataSnapshot"].GetInt("default_snapshot_period", m_period); 123 m_period = config.Configs["DataSnapshot"].GetInt("default_snapshot_period", m_period);
113 m_maxStales = config.Configs["DataSnapshot"].GetInt("max_changes_before_update", m_maxStales); 124 m_maxStales = config.Configs["DataSnapshot"].GetInt("max_changes_before_update", m_maxStales);
114 m_snapsDir = config.Configs["DataSnapshot"].GetString("snapshot_cache_directory", m_snapsDir); 125 m_snapsDir = config.Configs["DataSnapshot"].GetString("snapshot_cache_directory", m_snapsDir);
@@ -116,10 +127,13 @@ namespace OpenSim.Region.DataSnapshot
116 m_listener_port = config.Configs["Network"].GetString("http_listener_port", m_listener_port); 127 m_listener_port = config.Configs["Network"].GetString("http_listener_port", m_listener_port);
117 128
118 String[] annoying_string_array = config.Configs["DataSnapshot"].GetString("disable_modules", "").Split(".".ToCharArray()); 129 String[] annoying_string_array = config.Configs["DataSnapshot"].GetString("disable_modules", "").Split(".".ToCharArray());
119 foreach (String bloody_wanker in annoying_string_array) { 130 foreach (String bloody_wanker in annoying_string_array)
131 {
120 m_disabledModules.Add(bloody_wanker); 132 m_disabledModules.Add(bloody_wanker);
121 } 133 }
122 } catch (Exception) { 134 }
135 catch (Exception)
136 {
123 m_log.Info("[DATASNAPSHOT]: Could not load configuration. DataSnapshot will be disabled."); 137 m_log.Info("[DATASNAPSHOT]: Could not load configuration. DataSnapshot will be disabled.");
124 m_enabled = false; 138 m_enabled = false;
125 return; 139 return;
@@ -147,7 +161,7 @@ namespace OpenSim.Region.DataSnapshot
147 161
148 MakeEverythingStale(); 162 MakeEverythingStale();
149 163
150 if (m_dataServices != "noservices") 164 if (m_dataServices != "" && m_dataServices != "noservices")
151 NotifyDataServices(m_dataServices); 165 NotifyDataServices(m_dataServices);
152 } 166 }
153 } 167 }