diff options
author | Justin Clark-Casey (justincc) | 2012-07-16 23:03:23 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-16 23:03:23 +0100 |
commit | ed14dac0a38defa64d36e691b12ba6a2e2b8642d (patch) | |
tree | 1ca425c24c9c6ff0fa404aec75b9805d8e3a4021 /OpenSim/Region | |
parent | sending more user-friendly messages to the script error window rather than th... (diff) | |
download | opensim-SC-ed14dac0a38defa64d36e691b12ba6a2e2b8642d.zip opensim-SC-ed14dac0a38defa64d36e691b12ba6a2e2b8642d.tar.gz opensim-SC-ed14dac0a38defa64d36e691b12ba6a2e2b8642d.tar.bz2 opensim-SC-ed14dac0a38defa64d36e691b12ba6a2e2b8642d.tar.xz |
Stop warning about no session from ViewerStats if user teleports to another region in the same simulator that was not next to the source region.
This was because teleporting to the new region invoked the new session setup code before the agent was removed from the old region, which then invoked the session teardown code.
Now, we only invoke the teardown code if the region ID occupied by the agent being removed is the same as the one registered for the current session.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/UserStatistics/WebStatsModule.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/UserStatistics/WebStatsModule.cs index faf746f..d1a7217 100644 --- a/OpenSim/Region/UserStatistics/WebStatsModule.cs +++ b/OpenSim/Region/UserStatistics/WebStatsModule.cs | |||
@@ -57,7 +57,12 @@ namespace OpenSim.Region.UserStatistics | |||
57 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 57 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
58 | 58 | ||
59 | private static SqliteConnection dbConn; | 59 | private static SqliteConnection dbConn; |
60 | |||
61 | /// <summary> | ||
62 | /// User statistics sessions keyed by agent ID | ||
63 | /// </summary> | ||
60 | private Dictionary<UUID, UserSessionID> m_sessions = new Dictionary<UUID, UserSessionID>(); | 64 | private Dictionary<UUID, UserSessionID> m_sessions = new Dictionary<UUID, UserSessionID>(); |
65 | |||
61 | private List<Scene> m_scenes = new List<Scene>(); | 66 | private List<Scene> m_scenes = new List<Scene>(); |
62 | private Dictionary<string, IStatsController> reports = new Dictionary<string, IStatsController>(); | 67 | private Dictionary<string, IStatsController> reports = new Dictionary<string, IStatsController>(); |
63 | private Dictionary<UUID, USimStatsData> m_simstatsCounters = new Dictionary<UUID, USimStatsData>(); | 68 | private Dictionary<UUID, USimStatsData> m_simstatsCounters = new Dictionary<UUID, USimStatsData>(); |
@@ -308,7 +313,6 @@ namespace OpenSim.Region.UserStatistics | |||
308 | scene.EventManager.OnDeregisterCaps += OnDeRegisterCaps; | 313 | scene.EventManager.OnDeregisterCaps += OnDeRegisterCaps; |
309 | scene.EventManager.OnClientClosed += OnClientClosed; | 314 | scene.EventManager.OnClientClosed += OnClientClosed; |
310 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; | 315 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; |
311 | scene.EventManager.OnMakeChildAgent += OnMakeChildAgent; | ||
312 | } | 316 | } |
313 | } | 317 | } |
314 | } | 318 | } |
@@ -342,15 +346,11 @@ namespace OpenSim.Region.UserStatistics | |||
342 | } | 346 | } |
343 | } | 347 | } |
344 | 348 | ||
345 | private void OnMakeChildAgent(ScenePresence agent) | ||
346 | { | ||
347 | } | ||
348 | |||
349 | private void OnClientClosed(UUID agentID, Scene scene) | 349 | private void OnClientClosed(UUID agentID, Scene scene) |
350 | { | 350 | { |
351 | lock (m_sessions) | 351 | lock (m_sessions) |
352 | { | 352 | { |
353 | if (m_sessions.ContainsKey(agentID)) | 353 | if (m_sessions.ContainsKey(agentID) && m_sessions[agentID].region_id == scene.RegionInfo.RegionID) |
354 | { | 354 | { |
355 | m_sessions.Remove(agentID); | 355 | m_sessions.Remove(agentID); |
356 | } | 356 | } |