From f5d82350bb622baa6f49042882e6c5cb49b24cc0 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 7 Jun 2011 10:51:12 -0700 Subject: This fixes the crash reported in http://opensimulator.org/mantis/view.php?id=5529 related to sending IMs to foreign friends who are offline. Hopefully. --- .../CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs index dee86df..7753c25 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs @@ -196,10 +196,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage Util.FireAndForget(delegate { - bool success = m_IMService.OutgoingInstantMessage(im, url, foreigner); - if (!success && account == null) + bool success = false; + if (foreigner && url == string.Empty) // we don't know about this user { - // One last chance string recipientUUI = TryGetRecipientUUI(new UUID(im.fromAgentID), toAgentID); m_log.DebugFormat("[HG MESSAGE TRANSFER]: Got UUI {0}", recipientUUI); if (recipientUUI != string.Empty) @@ -213,6 +212,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage } } } + else + success = m_IMService.OutgoingInstantMessage(im, url, foreigner); + if (!success && !foreigner) HandleUndeliveredMessage(im, result); else -- cgit v1.1