aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs19
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs3
4 files changed, 29 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 557555d..cb653ed 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1217,13 +1217,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1217 1217
1218 if (neighbour.RegionHandle != sp.Scene.RegionInfo.RegionHandle) 1218 if (neighbour.RegionHandle != sp.Scene.RegionInfo.RegionHandle)
1219 { 1219 {
1220 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
1221 try 1220 try
1222 { 1221 {
1223 //neighbour.ExternalEndPoint may return null, which will be caught 1222 // Let's put this back at sync, so that it doesn't clog
1224 d.BeginInvoke(sp, cagents[count], neighbour, neighbour.ExternalEndPoint, newAgent, 1223 // the network, especially for regions in the same physical server.
1225 InformClientOfNeighbourCompleted, 1224 // We're really not in a hurry here.
1226 d); 1225 InformClientOfNeighbourAsync(sp, cagents[count], neighbour, neighbour.ExternalEndPoint, newAgent);
1226 //InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
1227 //d.BeginInvoke(sp, cagents[count], neighbour, neighbour.ExternalEndPoint, newAgent,
1228 // InformClientOfNeighbourCompleted,
1229 // d);
1227 } 1230 }
1228 1231
1229 catch (ArgumentOutOfRangeException) 1232 catch (ArgumentOutOfRangeException)
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 6274e02..a2322b7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3395,10 +3395,10 @@ namespace OpenSim.Region.Framework.Scenes
3395 /// also return a reason.</returns> 3395 /// also return a reason.</returns>
3396 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason, bool requirePresenceLookup) 3396 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason, bool requirePresenceLookup)
3397 { 3397 {
3398 bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || 3398 bool vialogin = ((teleportFlags & (uint)TPFlags.ViaLogin) != 0 ||
3399 (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); 3399 (teleportFlags & (uint)TPFlags.ViaHGLogin) != 0);
3400 bool viahome = ((teleportFlags & (uint)Constants.TeleportFlags.ViaHome) != 0); 3400 bool viahome = ((teleportFlags & (uint)TPFlags.ViaHome) != 0);
3401 bool godlike = ((teleportFlags & (uint)Constants.TeleportFlags.Godlike) != 0); 3401 bool godlike = ((teleportFlags & (uint)TPFlags.Godlike) != 0);
3402 3402
3403 reason = String.Empty; 3403 reason = String.Empty;
3404 3404
@@ -3411,9 +3411,9 @@ namespace OpenSim.Region.Framework.Scenes
3411 3411
3412 // Don't disable this log message - it's too helpful 3412 // Don't disable this log message - it's too helpful
3413 m_log.DebugFormat( 3413 m_log.DebugFormat(
3414 "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags {8}, position {9})", 3414 "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags ({8}), position {9})",
3415 RegionInfo.RegionName, (agent.child ? "child" : "root"),agent.firstname, agent.lastname, 3415 RegionInfo.RegionName, (agent.child ? "child" : "root"),agent.firstname, agent.lastname,
3416 agent.AgentID, agent.circuitcode, agent.IPAddress, agent.Viewer, teleportFlags, agent.startpos); 3416 agent.AgentID, agent.circuitcode, agent.IPAddress, agent.Viewer, ((TPFlags)teleportFlags).ToString(), agent.startpos);
3417 3417
3418 if (LoginsDisabled) 3418 if (LoginsDisabled)
3419 { 3419 {
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 27833e8..a3dd53e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -140,6 +140,7 @@ namespace OpenSim.Region.Framework.Scenes
140 icon.EndInvoke(iar); 140 icon.EndInvoke(iar);
141 } 141 }
142 142
143 ExpiringCache<string, bool> _failedSims = new ExpiringCache<string, bool>();
143 public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence) 144 public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence)
144 { 145 {
145 // This assumes that we know what our neighbors are. 146 // This assumes that we know what our neighbors are.
@@ -156,16 +157,22 @@ namespace OpenSim.Region.Framework.Scenes
156 // that the region position is cached or performance will degrade 157 // that the region position is cached or performance will degrade
157 Utils.LongToUInts(regionHandle, out x, out y); 158 Utils.LongToUInts(regionHandle, out x, out y);
158 GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); 159 GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
159 if (! simulatorList.Contains(dest.ServerURI)) 160 bool v = true;
161 if (! simulatorList.Contains(dest.ServerURI) && !_failedSims.TryGetValue(dest.ServerURI, out v))
160 { 162 {
161 // we havent seen this simulator before, add it to the list 163 // we havent seen this simulator before, add it to the list
162 // and send it an update 164 // and send it an update
163 simulatorList.Add(dest.ServerURI); 165 simulatorList.Add(dest.ServerURI);
164 166 // Let move this to sync. Mono definitely does not like async networking.
165 SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; 167 if (!m_scene.SimulationService.UpdateAgent(dest, cAgentData))
166 d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, dest, 168 // Also if it fails, get it out of the loop for a bit
167 SendChildAgentDataUpdateCompleted, 169 _failedSims.Add(dest.ServerURI, true, 120);
168 d); 170
171 // Leaving this here as a reminder that we tried, and it sucks.
172 //SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync;
173 //d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, dest,
174 // SendChildAgentDataUpdateCompleted,
175 // d);
169 } 176 }
170 } 177 }
171 } 178 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 8a42616..b38523f 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2787,7 +2787,8 @@ namespace OpenSim.Region.Framework.Scenes
2787 AgentPosition agentpos = new AgentPosition(); 2787 AgentPosition agentpos = new AgentPosition();
2788 agentpos.CopyFrom(cadu); 2788 agentpos.CopyFrom(cadu);
2789 2789
2790 m_scene.SendOutChildAgentUpdates(agentpos, this); 2790 // Let's get this out of the update loop
2791 Util.FireAndForget(delegate { m_scene.SendOutChildAgentUpdates(agentpos, this); });
2791 } 2792 }
2792 } 2793 }
2793 2794