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.

This commit is contained in:
Diva Canto
2011-06-07 10:51:12 -07:00
parent 1a23d322ac
commit f5d82350bb
6 changed files with 32 additions and 33 deletions

View File

@@ -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