From e10012a7a6a047287c193c4beb1afdcd62922e3e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 12 Feb 2014 23:16:42 +0000 Subject: 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 --- .../Linden/Caps/EventQueue/EventQueueGetModule.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 0dbdbaf..0447bc4 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -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) -- cgit v1.1