aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-16 23:15:02 +0100
committerJustin Clark-Casey (justincc)2012-07-16 23:15:02 +0100
commitc1667d39a610488e80e9d7c939ee7b449f02410d (patch)
tree0148c58260cffa4f2ed65010ea370091e8a233a4 /OpenSim/Region
parentIn WebStatsModule.OnMakeRootAgent(), get region ID directly from SP.Scene.Reg... (diff)
downloadopensim-SC_OLD-c1667d39a610488e80e9d7c939ee7b449f02410d.zip
opensim-SC_OLD-c1667d39a610488e80e9d7c939ee7b449f02410d.tar.gz
opensim-SC_OLD-c1667d39a610488e80e9d7c939ee7b449f02410d.tar.bz2
opensim-SC_OLD-c1667d39a610488e80e9d7c939ee7b449f02410d.tar.xz
refactor: factor out common code in WebStatsModule.OnMakeRootAgent()
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/UserStatistics/WebStatsModule.cs15
1 files changed, 7 insertions, 8 deletions
diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/UserStatistics/WebStatsModule.cs
index ed424ab..c11ea02 100644
--- a/OpenSim/Region/UserStatistics/WebStatsModule.cs
+++ b/OpenSim/Region/UserStatistics/WebStatsModule.cs
@@ -321,26 +321,25 @@ namespace OpenSim.Region.UserStatistics
321 { 321 {
322 lock (m_sessions) 322 lock (m_sessions)
323 { 323 {
324 UserSessionID uid;
325
324 if (!m_sessions.ContainsKey(agent.UUID)) 326 if (!m_sessions.ContainsKey(agent.UUID))
325 { 327 {
326 UserSessionData usd = UserSessionUtil.newUserSessionData(); 328 UserSessionData usd = UserSessionUtil.newUserSessionData();
327 329 uid = new UserSessionID();
328 UserSessionID uid = new UserSessionID();
329 uid.name_f = agent.Firstname; 330 uid.name_f = agent.Firstname;
330 uid.name_l = agent.Lastname; 331 uid.name_l = agent.Lastname;
331 uid.region_id = agent.Scene.RegionInfo.RegionID;
332 uid.session_id = agent.ControllingClient.SessionId;
333 uid.session_data = usd; 332 uid.session_data = usd;
334 333
335 m_sessions.Add(agent.UUID, uid); 334 m_sessions.Add(agent.UUID, uid);
336 } 335 }
337 else 336 else
338 { 337 {
339 UserSessionID uid = m_sessions[agent.UUID]; 338 uid = m_sessions[agent.UUID];
340 uid.region_id = agent.Scene.RegionInfo.RegionID;
341 uid.session_id = agent.ControllingClient.SessionId;
342 m_sessions[agent.UUID] = uid;
343 } 339 }
340
341 uid.region_id = agent.Scene.RegionInfo.RegionID;
342 uid.session_id = agent.ControllingClient.SessionId;
344 } 343 }
345 } 344 }
346 345