This hopefully fixes all issues with online/offline notifications across grids. http://opensimulator.org/mantis/view.php?id=5528

This commit is contained in:
Diva Canto
2011-06-07 19:36:04 -07:00
parent 02b40670be
commit 3307db5d4a
6 changed files with 99 additions and 16 deletions

View File

@@ -830,10 +830,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
public bool LocalStatusNotification(UUID userID, UUID friendID, bool online)
{
m_log.DebugFormat("[FRIENDS]: Local Status Notify {0} that user {1} is {2}", friendID, userID, online);
IClientAPI friendClient = LocateClientObject(friendID);
if (friendClient != null)
{
//m_log.DebugFormat("[FRIENDS]: Local Status Notify {0} that user {1} is {2}", friendID, userID, online);
// the friend in this sim as root agent
if (online)
friendClient.SendAgentOnline(new UUID[] { userID });

View File

@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
/// <param name="friendID">friend whose status changed</param>
/// <param name="online">status</param>
/// <returns></returns>
public bool StatusNotify(UUID userID, UUID friendID, bool online)
public bool StatusNotify(UUID friendID, UUID userID, bool online)
{
return LocalStatusNotification(friendID, userID, online);
}
@@ -279,7 +279,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
foreach (FriendInfo f in kvp.Value)
ids.Add(f.Friend);
UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key);
uConn.StatusNotification(ids, userID, online);
List<UUID> friendsOnline = uConn.StatusNotification(ids, userID, online);
// need to debug this here
if (online)
{
IClientAPI client = LocateClientObject(userID);
if (client != null)
client.SendAgentOnline(friendsOnline.ToArray());
}
}
}
}