From 24f28d353427d1905ae1a46408841265379e29c3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 23 May 2011 19:45:39 -0700 Subject: HG friends: Status notifications working. Also initial logins get the online friends in other grids. --- .../Services/HypergridService/UserAgentService.cs | 172 ++++++++++++++++++++- 1 file changed, 169 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 445d45e..0181533 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -31,10 +31,12 @@ using System.Net; using System.Reflection; using OpenSim.Framework; +using OpenSim.Services.Connectors.Friends; using OpenSim.Services.Connectors.Hypergrid; using OpenSim.Services.Interfaces; using GridRegion = OpenSim.Services.Interfaces.GridRegion; using OpenSim.Server.Base; +using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; using OpenMetaverse; using log4net; @@ -63,19 +65,34 @@ namespace OpenSim.Services.HypergridService protected static IGridService m_GridService; protected static GatekeeperServiceConnector m_GatekeeperConnector; protected static IGatekeeperService m_GatekeeperService; + protected static IFriendsService m_FriendsService; + protected static IPresenceService m_PresenceService; + protected static IFriendsSimConnector m_FriendsLocalSimConnector; // standalone, points to HGFriendsModule + protected static FriendsSimConnector m_FriendsSimConnector; // grid protected static string m_GridName; protected static bool m_BypassClientVerification; - public UserAgentService(IConfigSource config) + public UserAgentService(IConfigSource config) : this(config, null) { + } + + public UserAgentService(IConfigSource config, IFriendsSimConnector friendsConnector) + { + // Let's set this always, because we don't know the sequence + // of instantiations + if (friendsConnector != null) + m_FriendsLocalSimConnector = friendsConnector; + if (!m_Initialized) { m_Initialized = true; m_log.DebugFormat("[HOME USERS SECURITY]: Starting..."); - + + m_FriendsSimConnector = new FriendsSimConnector(); + IConfig serverConfig = config.Configs["UserAgentService"]; if (serverConfig == null) throw new Exception(String.Format("No section UserAgentService in config file")); @@ -83,6 +100,8 @@ namespace OpenSim.Services.HypergridService string gridService = serverConfig.GetString("GridService", String.Empty); string gridUserService = serverConfig.GetString("GridUserService", String.Empty); string gatekeeperService = serverConfig.GetString("GatekeeperService", String.Empty); + string friendsService = serverConfig.GetString("FriendsService", String.Empty); + string presenceService = serverConfig.GetString("PresenceService", String.Empty); m_BypassClientVerification = serverConfig.GetBoolean("BypassClientVerification", false); @@ -94,6 +113,8 @@ namespace OpenSim.Services.HypergridService m_GridUserService = ServerUtils.LoadPlugin(gridUserService, args); m_GatekeeperConnector = new GatekeeperServiceConnector(); m_GatekeeperService = ServerUtils.LoadPlugin(gatekeeperService, args); + m_FriendsService = ServerUtils.LoadPlugin(friendsService, args); + m_PresenceService = ServerUtils.LoadPlugin(presenceService, args); m_GridName = serverConfig.GetString("ExternalName", string.Empty); if (m_GridName == string.Empty) @@ -156,11 +177,16 @@ namespace OpenSim.Services.HypergridService string gridName = gatekeeper.ServerURI; m_log.DebugFormat("[USER AGENT SERVICE]: this grid: {0}, desired grid: {1}", m_GridName, gridName); - + if (m_GridName == gridName) success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); else + { success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out myExternalIP, out reason); + if (success) + // Report them as nowhere + m_PresenceService.ReportAgent(agentCircuit.SessionID, UUID.Zero); + } if (!success) { @@ -179,6 +205,7 @@ namespace OpenSim.Services.HypergridService if (clientIP != null) m_TravelingAgents[agentCircuit.SessionID].ClientIPAddress = clientIP.Address.ToString(); m_TravelingAgents[agentCircuit.SessionID].MyIpAddress = myExternalIP; + return true; } @@ -291,6 +318,145 @@ namespace OpenSim.Services.HypergridService return false; } + public void StatusNotification(List friends, UUID foreignUserID, bool online) + { + if (m_FriendsService == null || m_PresenceService == null) + { + m_log.WarnFormat("[USER AGENT SERVICE]: Unable to perform status notifications because friends or presence services are missing"); + return; + } + + m_log.DebugFormat("[USER AGENT SERVICE]: Status notification: foreign user {0} wants to notify {1} local friends", foreignUserID, friends.Count); + + // First, let's double check that the reported friends are, indeed, friends of that user + // And let's check that the secret matches + List usersToBeNotified = new List(); + foreach (string uui in friends) + { + UUID localUserID; + string secret = string.Empty, tmp = string.Empty; + if (Util.ParseUniversalUserIdentifier(uui, out localUserID, out tmp, out tmp, out tmp, out secret)) + { + FriendInfo[] friendInfos = m_FriendsService.GetFriends(localUserID); + foreach (FriendInfo finfo in friendInfos) + { + if (finfo.Friend.StartsWith(foreignUserID.ToString()) && finfo.Friend.EndsWith(secret)) + { + // great! + usersToBeNotified.Add(localUserID.ToString()); + } + } + } + } + + // Now, let's send the notifications + m_log.DebugFormat("[USER AGENT SERVICE]: Status notification: user has {0} local friends", usersToBeNotified.Count); + + // First, let's send notifications to local users who are online in the home grid + PresenceInfo[] friendSessions = m_PresenceService.GetAgents(usersToBeNotified.ToArray()); + if (friendSessions != null && friendSessions.Length > 0) + { + PresenceInfo friendSession = null; + foreach (PresenceInfo pinfo in friendSessions) + if (pinfo.RegionID != UUID.Zero) // let's guard against traveling agents + { + friendSession = pinfo; + break; + } + + if (friendSession != null) + { + ForwardStatusNotificationToSim(friendSession.RegionID, friendSession.UserID, foreignUserID, online); + usersToBeNotified.Remove(friendSession.UserID.ToString()); + } + } + + // Lastly, let's notify the rest who may be online somewhere else + foreach (string user in usersToBeNotified) + { + UUID id = new UUID(user); + if (m_TravelingAgents.ContainsKey(id) && m_TravelingAgents[id].GridExternalName != m_GridName) + { + string url = m_TravelingAgents[id].GridExternalName; + // forward + m_log.WarnFormat("[USER AGENT SERVICE]: User {0} is visiting {1}. HG Status notifications still not implemented.", user, url); + } + } + } + + protected void ForwardStatusNotificationToSim(UUID regionID, string user, UUID foreignUserID, bool online) + { + UUID userID; + if (UUID.TryParse(user, out userID)) + { + if (m_FriendsLocalSimConnector != null) + { + m_log.DebugFormat("[USER AGENT SERVICE]: Local Notify, user {0} is {1}", foreignUserID, (online ? "online" : "offline")); + m_FriendsLocalSimConnector.StatusNotify(userID, foreignUserID, online); + } + else + { + GridRegion region = m_GridService.GetRegionByUUID(UUID.Zero /* !!! */, regionID); + if (region != null) + { + m_log.DebugFormat("[USER AGENT SERVICE]: Remote Notify to region {0}, user {1} is {2}", region.RegionName, user, foreignUserID, (online ? "online" : "offline")); + m_FriendsSimConnector.StatusNotify(region, userID, foreignUserID, online); + } + } + } + } + + public List GetOnlineFriends(UUID foreignUserID, List friends) + { + List online = new List(); + + if (m_FriendsService == null || m_PresenceService == null) + { + m_log.WarnFormat("[USER AGENT SERVICE]: Unable to get online friends because friends or presence services are missing"); + return online; + } + + m_log.DebugFormat("[USER AGENT SERVICE]: Foreign user {0} wants to know status of {1} local friends", foreignUserID, friends.Count); + + // First, let's double check that the reported friends are, indeed, friends of that user + // And let's check that the secret matches and the rights + List usersToBeNotified = new List(); + foreach (string uui in friends) + { + UUID localUserID; + string secret = string.Empty, tmp = string.Empty; + if (Util.ParseUniversalUserIdentifier(uui, out localUserID, out tmp, out tmp, out tmp, out secret)) + { + FriendInfo[] friendInfos = m_FriendsService.GetFriends(localUserID); + foreach (FriendInfo finfo in friendInfos) + { + if (finfo.Friend.StartsWith(foreignUserID.ToString()) && finfo.Friend.EndsWith(secret) && + (finfo.TheirFlags & (int)FriendRights.CanSeeOnline) != 0 && (finfo.TheirFlags != -1)) + { + // great! + usersToBeNotified.Add(localUserID.ToString()); + } + } + } + } + + // Now, let's find out their status + m_log.DebugFormat("[USER AGENT SERVICE]: GetOnlineFriends: user has {0} local friends with status rights", usersToBeNotified.Count); + + // First, let's send notifications to local users who are online in the home grid + PresenceInfo[] friendSessions = m_PresenceService.GetAgents(usersToBeNotified.ToArray()); + if (friendSessions != null && friendSessions.Length > 0) + { + foreach (PresenceInfo pi in friendSessions) + { + UUID presenceID; + if (UUID.TryParse(pi.UserID, out presenceID)) + online.Add(presenceID); + } + } + + return online; + } } class TravelingAgentInfo -- cgit v1.1 From e19031849ec2957f7312d7e2417bd8c8da0efc53 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 24 May 2011 09:38:03 -0700 Subject: Added necessary code to drop inventory on hg friends using the profile window, but can't test because this mechanism doesn't seem to work without a profile service. --- OpenSim/Services/HypergridService/UserAgentService.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 0181533..e63f941 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -67,6 +67,7 @@ namespace OpenSim.Services.HypergridService protected static IGatekeeperService m_GatekeeperService; protected static IFriendsService m_FriendsService; protected static IPresenceService m_PresenceService; + protected static IUserAccountService m_UserAccountService; protected static IFriendsSimConnector m_FriendsLocalSimConnector; // standalone, points to HGFriendsModule protected static FriendsSimConnector m_FriendsSimConnector; // grid @@ -102,6 +103,7 @@ namespace OpenSim.Services.HypergridService string gatekeeperService = serverConfig.GetString("GatekeeperService", String.Empty); string friendsService = serverConfig.GetString("FriendsService", String.Empty); string presenceService = serverConfig.GetString("PresenceService", String.Empty); + string userAccountService = serverConfig.GetString("UserAccountService", String.Empty); m_BypassClientVerification = serverConfig.GetBoolean("BypassClientVerification", false); @@ -115,6 +117,7 @@ namespace OpenSim.Services.HypergridService m_GatekeeperService = ServerUtils.LoadPlugin(gatekeeperService, args); m_FriendsService = ServerUtils.LoadPlugin(friendsService, args); m_PresenceService = ServerUtils.LoadPlugin(presenceService, args); + m_UserAccountService = ServerUtils.LoadPlugin(userAccountService, args); m_GridName = serverConfig.GetString("ExternalName", string.Empty); if (m_GridName == string.Empty) @@ -457,6 +460,20 @@ namespace OpenSim.Services.HypergridService return online; } + + public Dictionary GetServerURLs(UUID userID) + { + if (m_UserAccountService == null) + { + m_log.WarnFormat("[USER AGENT SERVICE]: Unable to get server URLs because user account service is missing"); + return new Dictionary(); + } + UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero /*!!!*/, userID); + if (account != null) + return account.ServiceURLs; + + return new Dictionary(); + } } class TravelingAgentInfo -- cgit v1.1 From 5c2168cae758ae19367f4c2f5a02713e74fc0912 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 25 May 2011 12:32:21 -0700 Subject: HG: Instant Message working. Tested on HG standalones only. Needs a lot more testing. --- OpenSim/Services/HypergridService/UserAgentService.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index e63f941..59ad043 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -474,6 +474,17 @@ namespace OpenSim.Services.HypergridService return new Dictionary(); } + + public string LocateUser(UUID userID) + { + foreach (TravelingAgentInfo t in m_TravelingAgents.Values) + { + if (t.UserID == userID) + return t.GridExternalName; + } + + return string.Empty; + } } class TravelingAgentInfo -- cgit v1.1 From 0c58a9e68074f3593920dc9f2356bbed96416497 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 26 May 2011 10:04:48 -0700 Subject: HG IM in grid mode working fairly well. Unknown target user references looked back in source user's User Agent service. --- .../Services/HypergridService/UserAgentService.cs | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 59ad043..387547e 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -485,6 +485,30 @@ namespace OpenSim.Services.HypergridService return string.Empty; } + + public string GetUUI(UUID userID, UUID targetUserID) + { + // Let's see if it's a local user + UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, targetUserID); + if (account != null) + return targetUserID.ToString() + ";" + m_GridName + ";" + account.FirstName + " " + account.LastName ; + + // Let's try the list of friends + FriendInfo[] friends = m_FriendsService.GetFriends(userID); + if (friends != null && friends.Length > 0) + { + foreach (FriendInfo f in friends) + if (f.Friend.StartsWith(targetUserID.ToString())) + { + // Let's remove the secret + UUID id; string tmp = string.Empty, secret = string.Empty; + if (Util.ParseUniversalUserIdentifier(f.Friend, out id, out tmp, out tmp, out tmp, out secret)) + return f.Friend.Replace(secret, "0"); + } + } + + return string.Empty; + } } class TravelingAgentInfo -- cgit v1.1 From 4b9e446c6267a1161263d885699e72c97e8a94eb Mon Sep 17 00:00:00 2001 From: BlueWall Date: Wed, 1 Jun 2011 16:57:01 -0400 Subject: Use current TravelingAgent if the login failure reason is "Logins Disabled" to fix NullReferenceException, allowing agent to login to fallback region when logins are disabled by "StartDisabled = true" or when logins are disabled by RegionReady --- OpenSim/Services/HypergridService/UserAgentService.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 387547e..2f2ebfb 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -197,8 +197,11 @@ namespace OpenSim.Services.HypergridService agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason); // restore the old travel info - lock (m_TravelingAgents) - m_TravelingAgents[agentCircuit.SessionID] = old; + if(reason != "Logins Disabled") + { + lock (m_TravelingAgents) + m_TravelingAgents[agentCircuit.SessionID] = old; + } return false; } -- cgit v1.1 From 0a430bbffb561a5172220e7617257798c11a66f5 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Wed, 1 Jun 2011 18:10:56 -0400 Subject: Revert "Use current TravelingAgent if the login failure reason is "Logins Disabled" to fix NullReferenceException, allowing agent to login to fallback region when logins are disabled by "StartDisabled = true" or when logins are disabled by RegionReady" This reverts commit 4b9e446c6267a1161263d885699e72c97e8a94eb. --- OpenSim/Services/HypergridService/UserAgentService.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 2f2ebfb..387547e 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -197,11 +197,8 @@ namespace OpenSim.Services.HypergridService agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason); // restore the old travel info - if(reason != "Logins Disabled") - { - lock (m_TravelingAgents) - m_TravelingAgents[agentCircuit.SessionID] = old; - } + lock (m_TravelingAgents) + m_TravelingAgents[agentCircuit.SessionID] = old; return false; } -- cgit v1.1 From 777f57d9469d4df11ea2bf2bd0704f89cae34b0a Mon Sep 17 00:00:00 2001 From: BlueWall Date: Wed, 1 Jun 2011 18:47:06 -0400 Subject: Re-Apply Use current TravelingAgent if the the login failure reason is "Logins Disabled" to fix NullReferenceException, allowing agent to login to fallback region when logins are disabled by "StartDisabled = true" or when logins are disabled by RegionReady"" This reverts commit 0a430bbffb561a5172220e7617257798c11a66f5. --- OpenSim/Services/HypergridService/UserAgentService.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 387547e..2f2ebfb 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -197,8 +197,11 @@ namespace OpenSim.Services.HypergridService agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason); // restore the old travel info - lock (m_TravelingAgents) - m_TravelingAgents[agentCircuit.SessionID] = old; + if(reason != "Logins Disabled") + { + lock (m_TravelingAgents) + m_TravelingAgents[agentCircuit.SessionID] = old; + } return false; } -- cgit v1.1 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. --- OpenSim/Services/HypergridService/UserAgentService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 2f2ebfb..8d78f97 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -482,7 +482,7 @@ namespace OpenSim.Services.HypergridService { foreach (TravelingAgentInfo t in m_TravelingAgents.Values) { - if (t.UserID == userID) + if (t.UserID == userID && !m_GridName.Equals(t.GridExternalName)) return t.GridExternalName; } -- cgit v1.1 From 3307db5d4aedec5cc31541e9a28a95abdd4999d0 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 7 Jun 2011 19:36:04 -0700 Subject: This hopefully fixes all issues with online/offline notifications across grids. http://opensimulator.org/mantis/view.php?id=5528 --- .../Services/HypergridService/UserAgentService.cs | 28 ++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 8d78f97..29d8b3d 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -324,14 +324,16 @@ namespace OpenSim.Services.HypergridService return false; } - public void StatusNotification(List friends, UUID foreignUserID, bool online) + public List StatusNotification(List friends, UUID foreignUserID, bool online) { if (m_FriendsService == null || m_PresenceService == null) { m_log.WarnFormat("[USER AGENT SERVICE]: Unable to perform status notifications because friends or presence services are missing"); - return; + return new List(); } + List localFriendsOnline = new List(); + m_log.DebugFormat("[USER AGENT SERVICE]: Status notification: foreign user {0} wants to notify {1} local friends", foreignUserID, friends.Count); // First, let's double check that the reported friends are, indeed, friends of that user @@ -372,8 +374,12 @@ namespace OpenSim.Services.HypergridService if (friendSession != null) { - ForwardStatusNotificationToSim(friendSession.RegionID, friendSession.UserID, foreignUserID, online); + ForwardStatusNotificationToSim(friendSession.RegionID, foreignUserID, friendSession.UserID, online); usersToBeNotified.Remove(friendSession.UserID.ToString()); + UUID id; + if (UUID.TryParse(friendSession.UserID, out id)) + localFriendsOnline.Add(id); + } } @@ -388,9 +394,17 @@ namespace OpenSim.Services.HypergridService m_log.WarnFormat("[USER AGENT SERVICE]: User {0} is visiting {1}. HG Status notifications still not implemented.", user, url); } } + + // and finally, let's send the online friends + if (online) + { + return localFriendsOnline; + } + else + return new List(); } - protected void ForwardStatusNotificationToSim(UUID regionID, string user, UUID foreignUserID, bool online) + protected void ForwardStatusNotificationToSim(UUID regionID, UUID foreignUserID, string user, bool online) { UUID userID; if (UUID.TryParse(user, out userID)) @@ -398,15 +412,15 @@ namespace OpenSim.Services.HypergridService if (m_FriendsLocalSimConnector != null) { m_log.DebugFormat("[USER AGENT SERVICE]: Local Notify, user {0} is {1}", foreignUserID, (online ? "online" : "offline")); - m_FriendsLocalSimConnector.StatusNotify(userID, foreignUserID, online); + m_FriendsLocalSimConnector.StatusNotify(foreignUserID, userID, online); } else { GridRegion region = m_GridService.GetRegionByUUID(UUID.Zero /* !!! */, regionID); if (region != null) { - m_log.DebugFormat("[USER AGENT SERVICE]: Remote Notify to region {0}, user {1} is {2}", region.RegionName, user, foreignUserID, (online ? "online" : "offline")); - m_FriendsSimConnector.StatusNotify(region, userID, foreignUserID, online); + m_log.DebugFormat("[USER AGENT SERVICE]: Remote Notify to region {0}, user {1} is {2}", region.RegionName, foreignUserID, (online ? "online" : "offline")); + m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID, online); } } } -- cgit v1.1 From eabfc9ca153b1b9775bada56c2c0120768a77fda Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 7 Jun 2011 20:05:24 -0700 Subject: Added error message to help understand http://opensimulator.org/mantis/view.php?id=5527 --- OpenSim/Services/HypergridService/UserAgentService.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 29d8b3d..7ed5ea5 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -496,6 +496,11 @@ namespace OpenSim.Services.HypergridService { foreach (TravelingAgentInfo t in m_TravelingAgents.Values) { + if (t == null) + { + m_log.ErrorFormat("[USER AGENT SERVICE]: Oops! Null TravelingAgentInfo. Please report this on mantis"); + continue; + } if (t.UserID == userID && !m_GridName.Equals(t.GridExternalName)) return t.GridExternalName; } -- cgit v1.1