* Kill an endless loop in the Instant Message delivery system

* Must compare user region with previous calling of the same method to determine if we should look the user up.
* The first time, the previous region handle will be 0, so therefore it'll use the cached version.
* The second time, previousRegionHandle will be what we looked up on the first round
* The third time, it'll say..  we tried to deliver it once with or without lookup, we tried to deliver it a second time with lookup, and failed both times so end!
0.6.2-post-fixes
Teravus Ovares 2009-01-06 00:57:33 +00:00
parent 0d1b867500
commit 4f0bbf5d61
1 changed files with 8 additions and 0 deletions

View File

@ -436,6 +436,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
upd = new UserAgentData(); upd = new UserAgentData();
upd.AgentOnline = true; upd.AgentOnline = true;
upd.Handle = m_UserRegionMap[toAgentID]; upd.Handle = m_UserRegionMap[toAgentID];
// We need to compare the current regionhandle with the previous region handle
// or the recursive loop will never end because it will never try to lookup the agent again
if (prevRegionHandle == upd.Handle)
{
lookupAgent = true;
}
} }
else else
{ {
@ -443,6 +450,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
} }
} }
// Are we needing to look-up an agent? // Are we needing to look-up an agent?
if (lookupAgent) if (lookupAgent)
{ {