diff options
author | Jeff Ames | 2008-05-14 05:33:32 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-14 05:33:32 +0000 |
commit | 6a1b787436cc59043a26a296781e7a7b5ea0c67b (patch) | |
tree | 10f55a7b0abfdc47f103d40f13f3cae530c13581 /OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | |
parent | Formatting cleanup. (diff) | |
download | opensim-SC_OLD-6a1b787436cc59043a26a296781e7a7b5ea0c67b.zip opensim-SC_OLD-6a1b787436cc59043a26a296781e7a7b5ea0c67b.tar.gz opensim-SC_OLD-6a1b787436cc59043a26a296781e7a7b5ea0c67b.tar.bz2 opensim-SC_OLD-6a1b787436cc59043a26a296781e7a7b5ea0c67b.tar.xz |
More formatting cleanup.
Diffstat (limited to 'OpenSim/Region/DataSnapshot/DataSnapshotManager.cs')
-rw-r--r-- | OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 245922c..5831ddc 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | |||
@@ -78,43 +78,47 @@ namespace OpenSim.Region.DataSnapshot | |||
78 | if (!m_scenes.Contains(scene)) | 78 | if (!m_scenes.Contains(scene)) |
79 | m_scenes.Add(scene); | 79 | m_scenes.Add(scene); |
80 | 80 | ||
81 | if (!m_configLoaded) { | 81 | if (!m_configLoaded) |
82 | { | ||
82 | m_configLoaded = true; | 83 | m_configLoaded = true; |
83 | m_log.Info("[DATASNAPSHOT]: Loading configuration"); | 84 | m_log.Info("[DATASNAPSHOT]: Loading configuration"); |
84 | //Read from the config for options | 85 | //Read from the config for options |
85 | lock (m_syncInit) { | 86 | lock (m_syncInit) |
86 | try { | 87 | { |
87 | m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled); | 88 | try |
88 | if (config.Configs["Startup"].GetBoolean("gridmode", true)) | 89 | { |
89 | { | 90 | m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled); |
90 | m_gridinfo.Add("gridserverURL", config.Configs["Network"].GetString("grid_server_url", "harbl")); | 91 | if (config.Configs["Startup"].GetBoolean("gridmode", true)) |
91 | m_gridinfo.Add("userserverURL", config.Configs["Network"].GetString("user_server_url", "harbl")); | 92 | { |
92 | m_gridinfo.Add("assetserverURL", config.Configs["Network"].GetString("asset_server_url", "harbl")); | 93 | m_gridinfo.Add("gridserverURL", config.Configs["Network"].GetString("grid_server_url", "harbl")); |
93 | } | 94 | m_gridinfo.Add("userserverURL", config.Configs["Network"].GetString("user_server_url", "harbl")); |
94 | else | 95 | m_gridinfo.Add("assetserverURL", config.Configs["Network"].GetString("asset_server_url", "harbl")); |
95 | { | 96 | } |
96 | //Non gridmode stuff | 97 | else |
97 | } | 98 | { |
98 | 99 | //Non gridmode stuff | |
99 | m_gridinfo.Add("Name", config.Configs["DataSnapshot"].GetString("gridname", "harbl")); | 100 | } |
100 | m_maxSnapshots = config.Configs["DataSnapshot"].GetInt("max_snapshots", m_maxSnapshots); | 101 | |
101 | m_period = config.Configs["DataSnapshot"].GetInt("default_snapshot_period", m_period); | 102 | m_gridinfo.Add("Name", config.Configs["DataSnapshot"].GetString("gridname", "harbl")); |
102 | m_snapsDir = config.Configs["DataSnapshot"].GetString("snapshot_cache_directory", m_snapsDir); | 103 | m_maxSnapshots = config.Configs["DataSnapshot"].GetInt("max_snapshots", m_maxSnapshots); |
103 | m_dataServices = config.Configs["DataSnapshot"].GetString("data_services", m_dataServices); | 104 | m_period = config.Configs["DataSnapshot"].GetInt("default_snapshot_period", m_period); |
104 | m_listener_port = config.Configs["Network"].GetString("http_listener_port", m_listener_port); | 105 | m_snapsDir = config.Configs["DataSnapshot"].GetString("snapshot_cache_directory", m_snapsDir); |
105 | //BUG: Naming a search data module "DESUDESUDESU" will cause it to not get loaded by default. | 106 | m_dataServices = config.Configs["DataSnapshot"].GetString("data_services", m_dataServices); |
106 | //RESOLUTION: Wontfix, there are no Suiseiseki-loving developers | 107 | m_listener_port = config.Configs["Network"].GetString("http_listener_port", m_listener_port); |
107 | String[] annoying_string_array = config.Configs["DataSnapshot"].GetString("disable_modules", "DESUDESUDESU").Split(".".ToCharArray()); | 108 | //BUG: Naming a search data module "DESUDESUDESU" will cause it to not get loaded by default. |
108 | foreach (String bloody_wanker in annoying_string_array) { | 109 | //RESOLUTION: Wontfix, there are no Suiseiseki-loving developers |
109 | m_disabledModules.Add(bloody_wanker); | 110 | String[] annoying_string_array = config.Configs["DataSnapshot"].GetString("disable_modules", "DESUDESUDESU").Split(".".ToCharArray()); |
110 | } | 111 | foreach (String bloody_wanker in annoying_string_array) |
111 | 112 | { | |
112 | } catch (Exception) { | 113 | m_disabledModules.Add(bloody_wanker); |
114 | } | ||
115 | } | ||
116 | catch (Exception) | ||
117 | { | ||
113 | m_log.Info("[DATASNAPSHOT]: Could not load configuration. DataSnapshot will be disabled."); | 118 | m_log.Info("[DATASNAPSHOT]: Could not load configuration. DataSnapshot will be disabled."); |
114 | m_enabled = false; | 119 | m_enabled = false; |
115 | return; | 120 | return; |
116 | } | 121 | } |
117 | |||
118 | } | 122 | } |
119 | } | 123 | } |
120 | if (Directory.Exists(m_snapsDir)) | 124 | if (Directory.Exists(m_snapsDir)) |
@@ -135,7 +139,6 @@ namespace OpenSim.Region.DataSnapshot | |||
135 | } | 139 | } |
136 | } | 140 | } |
137 | 141 | ||
138 | |||
139 | if (m_enabled) | 142 | if (m_enabled) |
140 | { | 143 | { |
141 | m_log.Info("[DATASNAPSHOT]: Scene added to module."); | 144 | m_log.Info("[DATASNAPSHOT]: Scene added to module."); |