aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2011-06-11 17:48:19 -0700
committerDiva Canto2011-06-11 17:48:19 -0700
commit06e254c392c754bf7e7a1c80400a3ef5b1a82ca3 (patch)
tree781b3ead1675b488ac78a8def5eac1a22ac54fbe /OpenSim/Region
parentOnly send AgentOnline to the client if the friendsOnline list has elements. A... (diff)
downloadopensim-SC_OLD-06e254c392c754bf7e7a1c80400a3ef5b1a82ca3.zip
opensim-SC_OLD-06e254c392c754bf7e7a1c80400a3ef5b1a82ca3.tar.gz
opensim-SC_OLD-06e254c392c754bf7e7a1c80400a3ef5b1a82ca3.tar.bz2
opensim-SC_OLD-06e254c392c754bf7e7a1c80400a3ef5b1a82ca3.tar.xz
A few more cleanups on the way to close http://opensimulator.org/mantis/view.php?id=5516 once and for all. Moral of the story: don't send AgentOnline/Offline to viewers with a zero-length array.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs14
1 files changed, 3 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
index 2c91514..dda67f9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
@@ -280,10 +280,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
280 List<string> ids = new List<string>(); 280 List<string> ids = new List<string>();
281 foreach (FriendInfo f in kvp.Value) 281 foreach (FriendInfo f in kvp.Value)
282 ids.Add(f.Friend); 282 ids.Add(f.Friend);
283 UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key, false); 283 UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key);
284 List<UUID> friendsOnline = uConn.StatusNotification(ids, userID, online); 284 List<UUID> friendsOnline = uConn.StatusNotification(ids, userID, online);
285 Thread.Sleep(100); 285
286 // need to debug this here
287 if (online && friendsOnline.Count > 0) 286 if (online && friendsOnline.Count > 0)
288 { 287 {
289 IClientAPI client = LocateClientObject(userID); 288 IClientAPI client = LocateClientObject(userID);
@@ -305,15 +304,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
305 if (Util.ParseUniversalUserIdentifier(fid, out agentID, out url, out first, out last, out tmp)) 304 if (Util.ParseUniversalUserIdentifier(fid, out agentID, out url, out first, out last, out tmp))
306 { 305 {
307 IUserManagement userMan = m_Scenes[0].RequestModuleInterface<IUserManagement>(); 306 IUserManagement userMan = m_Scenes[0].RequestModuleInterface<IUserManagement>();
308 userMan.AddUser(agentID, url + ";" + first + " " + last); 307 userMan.AddUser(agentID, first, last, url);
309 308
310 try // our best
311 {
312 string[] parts = userMan.GetUserName(agentID).Split();
313 first = parts[0];
314 last = parts[1];
315 }
316 catch { }
317 return true; 309 return true;
318 } 310 }
319 return false; 311 return false;