If a caller tries to queue a CAPs message to a scene presence that has no event queue (e.g. an NPC), only warn if event queue debugging is greater than zero.

Removes the spurious log warnings if groups are active when NPCs are used.
Adds more regression tests associated with adding messages to the event queue
This commit is contained in:
Justin Clark-Casey (justincc)
2014-02-12 23:16:42 +00:00
parent b8e22f02e7
commit e10012a7a6
3 changed files with 101 additions and 7 deletions

View File

@@ -228,12 +228,18 @@ namespace OpenSim.Region.ClientStack.Linden
lock (queue)
queue.Enqueue(ev);
}
else
else if (DebugLevel > 0)
{
OSDMap evMap = (OSDMap)ev;
m_log.WarnFormat(
"[EVENTQUEUE]: (Enqueue) No queue found for agent {0} when placing message {1} in region {2}",
avatarID, evMap["message"], m_scene.Name);
ScenePresence sp = m_scene.GetScenePresence(avatarID);
// This assumes that an NPC should never have a queue.
if (sp != null && sp.PresenceType != PresenceType.Npc)
{
OSDMap evMap = (OSDMap)ev;
m_log.WarnFormat(
"[EVENTQUEUE]: (Enqueue) No queue found for agent {0} {1} when placing message {2} in region {3}",
sp.Name, sp.UUID, evMap["message"], m_scene.Name);
}
}
}
catch (NullReferenceException e)