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

0.7.4.1
Justin Clark-Casey (justincc) 2012-07-16 23:15:02 +01:00
parent 217f47b0d5
commit c1667d39a6
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;
}
}