Now showing friends online upon grid login.

slimupdates
Diva Canto 2010-02-26 10:35:23 -08:00
parent 2af7577fab
commit bbb43f9bde
5 changed files with 17 additions and 6 deletions

View File

@ -331,11 +331,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
private void SendPresence(UUID agentID) private void SendPresence(UUID agentID)
{ {
if (!m_Friends.ContainsKey(agentID)) if (!m_Friends.ContainsKey(agentID))
{
m_log.DebugFormat("[FRIENDS MODULE]: agent {0} not found in local cache", agentID);
return; return;
}
IClientAPI client = LocateClientObject(agentID); IClientAPI client = LocateClientObject(agentID);
if (client == null) if (client == null)
{
m_log.DebugFormat("[FRIENDS MODULE]: agent's client {0} not found in local scene", agentID);
return; return;
}
List<string> friendList = new List<string>(); List<string> friendList = new List<string>();

View File

@ -140,12 +140,13 @@ namespace OpenSim.Server.Base
if (name.EndsWith("[]")) if (name.EndsWith("[]"))
{ {
if (result.ContainsKey(name)) string cleanName = name.Substring(0, name.Length - 2);
if (result.ContainsKey(cleanName))
{ {
if (!(result[name] is List<string>)) if (!(result[cleanName] is List<string>))
continue; continue;
List<string> l = (List<string>)result[name]; List<string> l = (List<string>)result[cleanName];
l.Add(value); l.Add(value);
} }
@ -155,7 +156,7 @@ namespace OpenSim.Server.Base
newList.Add(value); newList.Add(value);
result[name] = newList; result[cleanName] = newList;
} }
} }
else else

View File

@ -227,7 +227,10 @@ namespace OpenSim.Server.Handlers.Presence
string[] userIDs; string[] userIDs;
if (!request.ContainsKey("uuids")) if (!request.ContainsKey("uuids"))
{
m_log.DebugFormat("[PRESENCE HANDLER]: GetAgents called without required uuids argument");
return FailureResult(); return FailureResult();
}
if (!(request["uuids"] is List<string>)) if (!(request["uuids"] is List<string>))
{ {

View File

@ -321,7 +321,7 @@ namespace OpenSim.Services.Connectors
string reply = string.Empty; string reply = string.Empty;
string reqString = ServerUtils.BuildQueryString(sendData); string reqString = ServerUtils.BuildQueryString(sendData);
// m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); //m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString);
try try
{ {
reply = SynchronousRestFormsRequester.MakeRequest("POST", reply = SynchronousRestFormsRequester.MakeRequest("POST",
@ -351,7 +351,7 @@ namespace OpenSim.Services.Connectors
} }
Dictionary<string, object>.ValueCollection pinfosList = replyData.Values; Dictionary<string, object>.ValueCollection pinfosList = replyData.Values;
//m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgents returned {0} elements", pinfosList.Count); m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgents returned {0} elements", pinfosList.Count);
foreach (object presence in pinfosList) foreach (object presence in pinfosList)
{ {
if (presence is Dictionary<string, object>) if (presence is Dictionary<string, object>)

View File

@ -206,6 +206,7 @@ namespace OpenSim.Services.PresenceService
} }
} }
m_log.DebugFormat("[PRESENCE SERVICE]: GetAgents for {0} userIDs found {1} presences", userIDs.Length, info.Count);
return info.ToArray(); return info.ToArray();
} }