Go easy on enforcing session ids in position updates

0.7.6-extended
Diva Canto 2013-08-09 08:31:15 -07:00
parent dbd773e89e
commit 7e01213bf2
1 changed files with 17 additions and 16 deletions

View File

@ -4267,24 +4267,25 @@ namespace OpenSim.Region.Framework.Scenes
ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
if (childAgentUpdate != null) if (childAgentUpdate != null)
{ {
if (childAgentUpdate.ControllingClient.SessionId == cAgentData.SessionID) if (childAgentUpdate.ControllingClient.SessionId != cAgentData.SessionID)
// Only warn for now
m_log.WarnFormat("[SCENE]: Attempt at updating position of agent {0} with invalid session id {1}. Neighbor running older version?",
childAgentUpdate.UUID, cAgentData.SessionID);
// I can't imagine *yet* why we would get an update if the agent is a root agent..
// however to avoid a race condition crossing borders..
if (childAgentUpdate.IsChildAgent)
{ {
// I can't imagine *yet* why we would get an update if the agent is a root agent.. uint rRegionX = (uint)(cAgentData.RegionHandle >> 40);
// however to avoid a race condition crossing borders.. uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8);
if (childAgentUpdate.IsChildAgent) uint tRegionX = RegionInfo.RegionLocX;
{ uint tRegionY = RegionInfo.RegionLocY;
uint rRegionX = (uint)(cAgentData.RegionHandle >> 40); //Send Data to ScenePresence
uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8); childAgentUpdate.ChildAgentDataUpdate(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY);
uint tRegionX = RegionInfo.RegionLocX; // Not Implemented:
uint tRegionY = RegionInfo.RegionLocY; //TODO: Do we need to pass the message on to one of our neighbors?
//Send Data to ScenePresence
childAgentUpdate.ChildAgentDataUpdate(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY);
// Not Implemented:
//TODO: Do we need to pass the message on to one of our neighbors?
}
} }
else
m_log.WarnFormat("[SCENE]: Attempt at updating position of agent {0} with invalid session id {1}", childAgentUpdate.UUID, cAgentData.SessionID);
return true; return true;
} }