From 3dbc7360498582278a9dad9eb899431d14e4e9cf Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 27 Jun 2010 13:23:51 -0700 Subject: Addresses mantis #4789. Not really a fix, because the event is harmless anyway. Just shouldn't happen normally. --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Server/Handlers/Simulation') diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 191acc9..bc31815 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -272,7 +272,7 @@ namespace OpenSim.Server.Handlers.Simulation //responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp); ??? instead } - // subclasses cab override this + // subclasses can override this protected virtual bool UpdateAgent(GridRegion destination, AgentData agent) { return m_SimulationService.UpdateAgent(destination, agent); @@ -280,6 +280,12 @@ namespace OpenSim.Server.Handlers.Simulation protected virtual void DoAgentGet(Hashtable request, Hashtable responsedata, UUID id, UUID regionID) { + if (m_SimulationService == null) + { + m_log.Debug("[AGENT HANDLER]: Agent GET called. Harmless but useless."); + return; + } + GridRegion destination = new GridRegion(); destination.RegionID = regionID; -- cgit v1.1 From b6264e60d39b12d03e3d5e57eb07fa7a5d1a2852 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 30 Jun 2010 06:35:22 -0700 Subject: Removed opportunity for exception in BaseHttpServer. (mantis #4825) --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Server/Handlers/Simulation') diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index bc31815..d261678 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -283,6 +283,10 @@ namespace OpenSim.Server.Handlers.Simulation if (m_SimulationService == null) { m_log.Debug("[AGENT HANDLER]: Agent GET called. Harmless but useless."); + responsedata["content_type"] = "application/json"; + responsedata["int_response_code"] = HttpStatusCode.NotImplemented; + responsedata["str_response_string"] = string.Empty; + return; } -- cgit v1.1