From 4f0bbf5d6111e273d5d1841f96695c34d4c432da Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 6 Jan 2009 00:57:33 +0000 Subject: * 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! --- .../Modules/Avatar/InstantMessage/MessageTransferModule.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/MessageTransferModule.cs index 838d42c..afd6a4c 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/MessageTransferModule.cs @@ -436,12 +436,20 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage upd = new UserAgentData(); upd.AgentOnline = true; 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 { lookupAgent = true; } } + // Are we needing to look-up an agent? if (lookupAgent) -- cgit v1.1