aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2016-12-02 22:56:14 +0000
committerUbitUmarov2016-12-02 22:56:14 +0000
commit6a8b8f3168d251d152fdeac007ab7a3f7a280e39 (patch)
tree6196b9907f22776bb6da0cf0f752338bbf3760e9
parent do a GC collect on last client exit (diff)
downloadopensim-SC-6a8b8f3168d251d152fdeac007ab7a3f7a280e39.zip
opensim-SC-6a8b8f3168d251d152fdeac007ab7a3f7a280e39.tar.gz
opensim-SC-6a8b8f3168d251d152fdeac007ab7a3f7a280e39.tar.bz2
opensim-SC-6a8b8f3168d251d152fdeac007ab7a3f7a280e39.tar.xz
change a wrong error message and avoid a null ref (that may happen due to needed time delays)
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs24
1 files changed, 11 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 33aa7ad..a7105e2 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -2093,19 +2093,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2093 spScene.SimulationService.UpdateAgent(neighbour, agentpos); 2093 spScene.SimulationService.UpdateAgent(neighbour, agentpos);
2094 } 2094 }
2095 } 2095 }
2096 catch (ArgumentOutOfRangeException)
2097 {
2098 m_log.ErrorFormat(
2099 "[ENTITY TRANSFER MODULE]: Neighbour Regions response included the current region in the neighbour list. The following region will not display to the client: {0} for region {1} ({2}, {3}).",
2100 neighbour.ExternalHostName,
2101 neighbour.RegionHandle,
2102 neighbour.RegionLocX,
2103 neighbour.RegionLocY);
2104 }
2105 catch (Exception e) 2096 catch (Exception e)
2106 { 2097 {
2107 m_log.ErrorFormat( 2098 m_log.ErrorFormat(
2108 "[ENTITY TRANSFER MODULE]: Could not resolve external hostname {0} for region {1} ({2}, {3}). {4}", 2099 "[ENTITY TRANSFER MODULE]: Error creating child agent at {0} ({1} ({2}, {3}). {4}",
2109 neighbour.ExternalHostName, 2100 neighbour.ExternalHostName,
2110 neighbour.RegionHandle, 2101 neighbour.RegionHandle,
2111 neighbour.RegionLocX, 2102 neighbour.RegionLocX,
@@ -2279,24 +2270,28 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2279 /// <param name="a"></param> 2270 /// <param name="a"></param>
2280 /// <param name="regionHandle"></param> 2271 /// <param name="regionHandle"></param>
2281 /// <param name="endPoint"></param> 2272 /// <param name="endPoint"></param>
2282 private void InformClientOfNeighbourAsync(ScenePresence sp, AgentCircuitData a, GridRegion reg, 2273 private void InformClientOfNeighbourAsync(ScenePresence sp, AgentCircuitData agentCircData, GridRegion reg,
2283 IPEndPoint endPoint, bool newAgent) 2274 IPEndPoint endPoint, bool newAgent)
2284 { 2275 {
2285 2276
2286 if (newAgent) 2277 if (newAgent)
2287 { 2278 {
2279 // we may already had lost this sp
2280 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened
2281 return;
2282
2288 Scene scene = sp.Scene; 2283 Scene scene = sp.Scene;
2289 2284
2290 m_log.DebugFormat( 2285 m_log.DebugFormat(
2291 "[ENTITY TRANSFER MODULE]: Informing {0} {1} about neighbour {2} {3} at ({4},{5})", 2286 "[ENTITY TRANSFER MODULE]: Informing {0} {1} about neighbour {2} {3} at ({4},{5})",
2292 sp.Name, sp.UUID, reg.RegionName, endPoint, reg.RegionCoordX, reg.RegionCoordY); 2287 sp.Name, sp.UUID, reg.RegionName, endPoint, reg.RegionCoordX, reg.RegionCoordY);
2293 2288
2294 string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath); 2289 string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(agentCircData.CapsPath);
2295 2290
2296 string reason = String.Empty; 2291 string reason = String.Empty;
2297 2292
2298 EntityTransferContext ctx = new EntityTransferContext(); 2293 EntityTransferContext ctx = new EntityTransferContext();
2299 bool regionAccepted = scene.SimulationService.CreateAgent(reg, reg, a, (uint)TeleportFlags.Default, ctx, out reason); 2294 bool regionAccepted = scene.SimulationService.CreateAgent(reg, reg, agentCircData, (uint)TeleportFlags.Default, ctx, out reason);
2300 2295
2301 if (regionAccepted) 2296 if (regionAccepted)
2302 { 2297 {
@@ -2306,6 +2301,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2306 if (m_eqModule != null) 2301 if (m_eqModule != null)
2307 { 2302 {
2308 #region IP Translation for NAT 2303 #region IP Translation for NAT
2304 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened
2305 return;
2306
2309 IClientIPEndpoint ipepClient; 2307 IClientIPEndpoint ipepClient;
2310 if (sp.ClientView.TryGet(out ipepClient)) 2308 if (sp.ClientView.TryGet(out ipepClient))
2311 { 2309 {