refactor: factor out common code in WebStatsModule.OnMakeRootAgent()

0.7.3-extended
Justin Clark-Casey (justincc) 2012-07-16 23:15:02 +01:00
parent cf2f6843c6
commit 2f865da5c7
1 changed files with 7 additions and 8 deletions

View File

@ -321,26 +321,25 @@ namespace OpenSim.Region.UserStatistics
{
lock (m_sessions)
{
UserSessionID uid;
if (!m_sessions.ContainsKey(agent.UUID))
{
UserSessionData usd = UserSessionUtil.newUserSessionData();
UserSessionID uid = new UserSessionID();
uid = new UserSessionID();
uid.name_f = agent.Firstname;
uid.name_l = agent.Lastname;
uid.region_id = agent.Scene.RegionInfo.RegionID;
uid.session_id = agent.ControllingClient.SessionId;
uid.session_data = usd;
m_sessions.Add(agent.UUID, uid);
}
else
{
UserSessionID uid = m_sessions[agent.UUID];
uid.region_id = agent.Scene.RegionInfo.RegionID;
uid.session_id = agent.ControllingClient.SessionId;
m_sessions[agent.UUID] = uid;
uid = m_sessions[agent.UUID];
}
uid.region_id = agent.Scene.RegionInfo.RegionID;
uid.session_id = agent.ControllingClient.SessionId;
}
}