* 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)
0.6.1-post-fixes
Teravus Ovares 2008-11-28 19:44:44 +00:00
parent 71e05a5707
commit 414bf2aaf1
2 changed files with 9 additions and 1 deletions

View File

@ -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;

View File

@ -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.");
}
}
/// <summary>