From cdf97ab3a654581fe5c3f29b1b3a6459c8c73378 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 7 May 2012 17:21:45 +0100 Subject: Fix a bug in FriendsModule.StatusNotify() where all subsequent friends would not be notified once a non-local friend was found. --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index fc6325d..98afbc9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -498,7 +498,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends Util.FireAndForget( delegate { - m_log.DebugFormat("[FRIENDS MODULE]: Notifying {0} friends", friendList.Count); + m_log.DebugFormat( + "[FRIENDS MODULE]: Notifying {0} friends of {1} of online status {2}", + friendList.Count, agentID, online); + // Notify about this user status StatusNotify(friendList, agentID, online); } @@ -515,7 +518,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends { // Try local if (LocalStatusNotification(userID, friendID, online)) - return; + continue; // The friend is not here [as root]. Let's forward. PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { friendID.ToString() }); @@ -523,11 +526,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends { PresenceInfo friendSession = null; foreach (PresenceInfo pinfo in friendSessions) + { if (pinfo.RegionID != UUID.Zero) // let's guard against sessions-gone-bad { friendSession = pinfo; break; } + } if (friendSession != null) { -- cgit v1.1