refactor: factor out common code in WebStatsModule.OnMakeRootAgent()
parent
217f47b0d5
commit
c1667d39a6
|
@ -321,26 +321,25 @@ namespace OpenSim.Region.UserStatistics
|
||||||
{
|
{
|
||||||
lock (m_sessions)
|
lock (m_sessions)
|
||||||
{
|
{
|
||||||
|
UserSessionID uid;
|
||||||
|
|
||||||
if (!m_sessions.ContainsKey(agent.UUID))
|
if (!m_sessions.ContainsKey(agent.UUID))
|
||||||
{
|
{
|
||||||
UserSessionData usd = UserSessionUtil.newUserSessionData();
|
UserSessionData usd = UserSessionUtil.newUserSessionData();
|
||||||
|
uid = new UserSessionID();
|
||||||
UserSessionID uid = new UserSessionID();
|
|
||||||
uid.name_f = agent.Firstname;
|
uid.name_f = agent.Firstname;
|
||||||
uid.name_l = agent.Lastname;
|
uid.name_l = agent.Lastname;
|
||||||
uid.region_id = agent.Scene.RegionInfo.RegionID;
|
|
||||||
uid.session_id = agent.ControllingClient.SessionId;
|
|
||||||
uid.session_data = usd;
|
uid.session_data = usd;
|
||||||
|
|
||||||
m_sessions.Add(agent.UUID, uid);
|
m_sessions.Add(agent.UUID, uid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UserSessionID uid = m_sessions[agent.UUID];
|
uid = m_sessions[agent.UUID];
|
||||||
|
}
|
||||||
|
|
||||||
uid.region_id = agent.Scene.RegionInfo.RegionID;
|
uid.region_id = agent.Scene.RegionInfo.RegionID;
|
||||||
uid.session_id = agent.ControllingClient.SessionId;
|
uid.session_id = agent.ControllingClient.SessionId;
|
||||||
m_sessions[agent.UUID] = uid;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue