diff options
author | Justin Clarke Casey | 2009-03-19 16:41:23 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-03-19 16:41:23 +0000 |
commit | eb0c36940943390504629576c0824efcde75bffb (patch) | |
tree | 252df9e94efea082622ee686201968f5e65f991f /OpenSim/Region/UserStatistics/WebStatsModule.cs | |
parent | reformatting README (just noticed that that line was a bit on the long (diff) | |
download | opensim-SC_OLD-eb0c36940943390504629576c0824efcde75bffb.zip opensim-SC_OLD-eb0c36940943390504629576c0824efcde75bffb.tar.gz opensim-SC_OLD-eb0c36940943390504629576c0824efcde75bffb.tar.bz2 opensim-SC_OLD-eb0c36940943390504629576c0824efcde75bffb.tar.xz |
* Add documentation to BaseHttpServer.AddHTTPHandler()
Diffstat (limited to 'OpenSim/Region/UserStatistics/WebStatsModule.cs')
-rw-r--r-- | OpenSim/Region/UserStatistics/WebStatsModule.cs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/UserStatistics/WebStatsModule.cs index e718560..3b83cc2 100644 --- a/OpenSim/Region/UserStatistics/WebStatsModule.cs +++ b/OpenSim/Region/UserStatistics/WebStatsModule.cs | |||
@@ -69,21 +69,19 @@ namespace OpenSim.Region.UserStatistics | |||
69 | private string m_loglines = String.Empty; | 69 | private string m_loglines = String.Empty; |
70 | private volatile int lastHit = 12000; | 70 | private volatile int lastHit = 12000; |
71 | 71 | ||
72 | |||
73 | public virtual void Initialise(Scene scene, IConfigSource config) | 72 | public virtual void Initialise(Scene scene, IConfigSource config) |
74 | { | 73 | { |
75 | IConfig cnfg; | 74 | IConfig cnfg; |
76 | try | 75 | try |
77 | { | 76 | { |
78 | cnfg = config.Configs["WebStats"]; | 77 | cnfg = config.Configs["WebStats"]; |
79 | enabled = cnfg.GetBoolean("enabled", false); | 78 | enabled = cnfg.GetBoolean("enabled", false); |
80 | |||
81 | |||
82 | } | 79 | } |
83 | catch (Exception) | 80 | catch (Exception) |
84 | { | 81 | { |
85 | enabled = false; | 82 | enabled = false; |
86 | } | 83 | } |
84 | |||
87 | if (!enabled) | 85 | if (!enabled) |
88 | { | 86 | { |
89 | return; | 87 | return; |
@@ -130,14 +128,12 @@ namespace OpenSim.Region.UserStatistics | |||
130 | 128 | ||
131 | scene.CommsManager.HttpServer.AddHTTPHandler("/SStats/", HandleStatsRequest); | 129 | scene.CommsManager.HttpServer.AddHTTPHandler("/SStats/", HandleStatsRequest); |
132 | scene.CommsManager.HttpServer.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest); | 130 | scene.CommsManager.HttpServer.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest); |
133 | |||
134 | |||
135 | } | 131 | } |
132 | |||
136 | m_scene.Add(scene); | 133 | m_scene.Add(scene); |
137 | m_simstatsCounters.Add(scene.RegionInfo.RegionID, new USimStatsData(scene.RegionInfo.RegionID)); | 134 | m_simstatsCounters.Add(scene.RegionInfo.RegionID, new USimStatsData(scene.RegionInfo.RegionID)); |
138 | scene.StatsReporter.OnSendStatsResult += ReceiveClassicSimStatsPacket; | 135 | scene.StatsReporter.OnSendStatsResult += ReceiveClassicSimStatsPacket; |
139 | } | 136 | } |
140 | |||
141 | } | 137 | } |
142 | 138 | ||
143 | public void ReceiveClassicSimStatsPacket(SimStats stats) | 139 | public void ReceiveClassicSimStatsPacket(SimStats stats) |
@@ -168,10 +164,10 @@ namespace OpenSim.Region.UserStatistics | |||
168 | } | 164 | } |
169 | } | 165 | } |
170 | catch (KeyNotFoundException) | 166 | catch (KeyNotFoundException) |
171 | { | 167 | { |
172 | |||
173 | } | 168 | } |
174 | } | 169 | } |
170 | |||
175 | public Hashtable HandleUnknownCAPSRequest(Hashtable request) | 171 | public Hashtable HandleUnknownCAPSRequest(Hashtable request) |
176 | { | 172 | { |
177 | //string regpath = request["uri"].ToString(); | 173 | //string regpath = request["uri"].ToString(); |
@@ -247,9 +243,7 @@ namespace OpenSim.Region.UserStatistics | |||
247 | 243 | ||
248 | return responsedata; | 244 | return responsedata; |
249 | } | 245 | } |
250 | |||
251 | 246 | ||
252 | |||
253 | public void CheckAndUpdateDatabase(SqliteConnection db) | 247 | public void CheckAndUpdateDatabase(SqliteConnection db) |
254 | { | 248 | { |
255 | lock (db) | 249 | lock (db) |