HG Friends: this was commented some commits ago, but it shouldn't have been.

cpu-performance
Diva Canto 2013-07-04 10:23:20 -07:00
parent 068a3afad9
commit 98a2fa8e35
1 changed files with 20 additions and 21 deletions

View File

@ -348,31 +348,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
return null;
}
// public override FriendInfo[] GetFriendsFromService(IClientAPI client)
// {
//// m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetFriendsFromService for {0}", client.Name);
// Boolean agentIsLocal = true;
// if (UserManagementModule != null)
// agentIsLocal = UserManagementModule.IsLocalGridUser(client.AgentId);
public override FriendInfo[] GetFriendsFromService(IClientAPI client)
{
// m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetFriendsFromService for {0}", client.Name);
Boolean agentIsLocal = true;
if (UserManagementModule != null)
agentIsLocal = UserManagementModule.IsLocalGridUser(client.AgentId);
// if (agentIsLocal)
// return base.GetFriendsFromService(client);
if (agentIsLocal)
return base.GetFriendsFromService(client);
// FriendInfo[] finfos = new FriendInfo[0];
// // Foreigner
// AgentCircuitData agentClientCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode);
// if (agentClientCircuit != null)
// {
// //[XXX] string agentUUI = Util.ProduceUserUniversalIdentifier(agentClientCircuit);
FriendInfo[] finfos = new FriendInfo[0];
// Foreigner
AgentCircuitData agentClientCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode);
if (agentClientCircuit != null)
{
// Note that this is calling a different interface than base; this one calls with a string param!
finfos = FriendsService.GetFriends(client.AgentId.ToString());
m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, client.AgentId.ToString());
}
// finfos = FriendsService.GetFriends(client.AgentId.ToString());
// m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, client.AgentId.ToString());
// }
// m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetFriendsFromService for {0}", client.Name);
//// m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetFriendsFromService for {0}", client.Name);
// return finfos;
// }
return finfos;
}
protected override bool StoreRights(UUID agentID, UUID friendID, int rights)
{