From 414bf2aaf1965d354927b7b2ebf57fcef1544d88 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 28 Nov 2008 19:44:44 +0000 Subject: [PATCH] * The equals override of 'Location' is not working as expected. This caused sim restarts to fail because the test that searches for and shutsdown the UDP server listener for that region never found and shutdown the udp server. hence the error message, "only one listener on port". * This is a high profile candidate for a unit test. (big) --- OpenSim/Region/Application/OpenSimBase.cs | 2 ++ OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f7ffa0099a..75bdcf35ef 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -484,6 +484,8 @@ namespace OpenSim for (int i = 0; i < m_clientServers.Count; i++) { + //--> Melanie, the following needs to be fixed + // the Equals override is not returning true if the locations are actually equal if (m_clientServers[i].HandlesRegion(new Location(whichRegion.RegionHandle))) { clientServerElement = i; diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 01f2a09360..8653b23f3d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -106,7 +106,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP public bool HandlesRegion(Location x) { - return x == m_location; + return x.RegionHandle == m_location.RegionHandle; + //return x == m_location; } public void AddScene(Scene x) @@ -306,6 +307,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP // the next set of UDP data is for a valid client. ResetServerEndPoint(e); } + catch (System.ObjectDisposedException) + { + m_log.Info("[UDPSERVER]: UDP Object disposed. No need to worry about this if you're restarting the simulator."); + } + } ///