From 3068cc36189223be473d3a022deb32eb39be760e Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 15 Nov 2011 15:04:41 +0000 Subject: [PATCH] refactor: Don't create a new UUID for passing uuids to client - UUIDs are structs are so not passed by reference (and they're immutable!) --- .../Region/CoreModules/Avatar/Friends/FriendsModule.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 2a1a1d5ec4..81e2a61afa 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -328,7 +328,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends List online = GetOnlineFriends(agentID); if (online.Count > 0) { - m_log.DebugFormat("[FRIENDS MODULE]: User {0} in region {1} has {2} friends online", client.AgentId, client.Scene.RegionInfo.RegionName, online.Count); + m_log.DebugFormat( + "[FRIENDS MODULE]: User {0} in region {1} has {2} friends online", + client.Name, client.Scene.RegionInfo.RegionName, online.Count); + client.SendAgentOnline(online.ToArray()); } @@ -814,16 +817,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends if (onlineBitChanged) { if ((rights & (int)FriendRights.CanSeeOnline) == 1) - friendClient.SendAgentOnline(new UUID[] { new UUID(userID) }); + friendClient.SendAgentOnline(new UUID[] { userID }); else - friendClient.SendAgentOffline(new UUID[] { new UUID(userID) }); + friendClient.SendAgentOffline(new UUID[] { userID }); } else { bool canEditObjectsChanged = ((rights ^ userFlags) & (int)FriendRights.CanModifyObjects) != 0; if (canEditObjectsChanged) friendClient.SendChangeUserRights(userID, friendID, rights); - } // Update local cache