diff options
Diffstat (limited to '')
7 files changed, 48 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index e5cefe4..8bf2bf8 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1203,6 +1203,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1203 | 1203 | ||
1204 | m_log.Debug("[ENTITY TRANSFER MODULE]: Completed inform client about neighbour " + endPoint.ToString()); | 1204 | m_log.Debug("[ENTITY TRANSFER MODULE]: Completed inform client about neighbour " + endPoint.ToString()); |
1205 | } | 1205 | } |
1206 | if (!regionAccepted) | ||
1207 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Region {0} did not accept agent: {1}", reg.RegionName, reason); | ||
1206 | } | 1208 | } |
1207 | 1209 | ||
1208 | /// <summary> | 1210 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 37b403e..2dd0099 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -300,7 +300,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
300 | if (s.RegionInfo.RegionID == destination.RegionID) | 300 | if (s.RegionInfo.RegionID == destination.RegionID) |
301 | { | 301 | { |
302 | //m_log.Debug("[LOCAL COMMS]: Found region to SendCloseAgent"); | 302 | //m_log.Debug("[LOCAL COMMS]: Found region to SendCloseAgent"); |
303 | return s.IncomingCloseAgent(id); | 303 | // Let's spawn a threadlet right here, because this may take |
304 | // a while | ||
305 | Util.FireAndForget(delegate { s.IncomingCloseAgent(id); }); | ||
306 | return true; | ||
304 | } | 307 | } |
305 | } | 308 | } |
306 | //m_log.Debug("[LOCAL COMMS]: region not found in SendCloseAgent"); | 309 | //m_log.Debug("[LOCAL COMMS]: region not found in SendCloseAgent"); |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index bdd1a0b..a9e46d0 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -102,7 +102,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
102 | GridRegion info = m_scene.GridService.GetRegionByName(m_scene.RegionInfo.ScopeID, mapName); | 102 | GridRegion info = m_scene.GridService.GetRegionByName(m_scene.RegionInfo.ScopeID, mapName); |
103 | if (info != null) regionInfos.Add(info); | 103 | if (info != null) regionInfos.Add(info); |
104 | } | 104 | } |
105 | 105 | m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count); | |
106 | List<MapBlockData> blocks = new List<MapBlockData>(); | 106 | List<MapBlockData> blocks = new List<MapBlockData>(); |
107 | 107 | ||
108 | MapBlockData data; | 108 | MapBlockData data; |
@@ -128,14 +128,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
128 | data.Agents = 0; | 128 | data.Agents = 0; |
129 | data.Access = 255; | 129 | data.Access = 255; |
130 | data.MapImageId = UUID.Zero; | 130 | data.MapImageId = UUID.Zero; |
131 | data.Name = mapName; | 131 | data.Name = ""; // mapName; |
132 | data.RegionFlags = 0; | 132 | data.RegionFlags = 0; |
133 | data.WaterHeight = 0; // not used | 133 | data.WaterHeight = 0; // not used |
134 | data.X = 0; | 134 | data.X = 0; |
135 | data.Y = 0; | 135 | data.Y = 0; |
136 | blocks.Add(data); | 136 | blocks.Add(data); |
137 | 137 | ||
138 | remoteClient.SendMapBlock(blocks, 2); | 138 | remoteClient.SendMapBlock(blocks, 0); |
139 | } | 139 | } |
140 | 140 | ||
141 | // private Scene GetClientScene(IClientAPI client) | 141 | // private Scene GetClientScene(IClientAPI client) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e27b2ba..12fd813 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2592,12 +2592,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
2592 | // and the scene presence and the client, if they exist | 2592 | // and the scene presence and the client, if they exist |
2593 | try | 2593 | try |
2594 | { | 2594 | { |
2595 | ScenePresence sp = GetScenePresence(agentID); | 2595 | // We need to wait for the client to make UDP contact first. |
2596 | PresenceService.LogoutAgent(sp.ControllingClient.SessionId); | 2596 | // It's the UDP contact that creates the scene presence |
2597 | 2597 | ScenePresence sp = WaitGetScenePresence(agentID); | |
2598 | if (sp != null) | 2598 | if (sp != null) |
2599 | sp.ControllingClient.Close(); | 2599 | { |
2600 | PresenceService.LogoutAgent(sp.ControllingClient.SessionId); | ||
2600 | 2601 | ||
2602 | sp.ControllingClient.Close(); | ||
2603 | } | ||
2604 | else | ||
2605 | { | ||
2606 | m_log.WarnFormat("[SCENE]: Could not find scene presence for {0}", agentID); | ||
2607 | } | ||
2601 | // BANG! SLASH! | 2608 | // BANG! SLASH! |
2602 | m_authenticateHandler.RemoveCircuit(agentID); | 2609 | m_authenticateHandler.RemoveCircuit(agentID); |
2603 | 2610 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 69ebe9e..f8ff308 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -258,13 +258,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
258 | 258 | ||
259 | } | 259 | } |
260 | 260 | ||
261 | public delegate void SendCloseChildAgentDelegate(UUID agentID, ulong regionHandle); | 261 | //public delegate void SendCloseChildAgentDelegate(UUID agentID, ulong regionHandle); |
262 | //private void SendCloseChildAgentCompleted(IAsyncResult iar) | ||
263 | //{ | ||
264 | // SendCloseChildAgentDelegate icon = (SendCloseChildAgentDelegate)iar.AsyncState; | ||
265 | // icon.EndInvoke(iar); | ||
266 | //} | ||
262 | 267 | ||
263 | /// <summary> | 268 | /// <summary> |
264 | /// This Closes child agents on neighboring regions | 269 | /// Closes a child agent on a given region |
265 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. | ||
266 | /// </summary> | 270 | /// </summary> |
267 | protected void SendCloseChildAgentAsync(UUID agentID, ulong regionHandle) | 271 | protected void SendCloseChildAgent(UUID agentID, ulong regionHandle) |
268 | { | 272 | { |
269 | 273 | ||
270 | m_log.Debug("[INTERGRID]: Sending close agent to " + regionHandle); | 274 | m_log.Debug("[INTERGRID]: Sending close agent to " + regionHandle); |
@@ -277,21 +281,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
277 | m_scene.SimulationService.CloseAgent(destination, agentID); | 281 | m_scene.SimulationService.CloseAgent(destination, agentID); |
278 | } | 282 | } |
279 | 283 | ||
280 | private void SendCloseChildAgentCompleted(IAsyncResult iar) | 284 | /// <summary> |
281 | { | 285 | /// Closes a child agents in a collection of regions. Does so asynchronously |
282 | SendCloseChildAgentDelegate icon = (SendCloseChildAgentDelegate)iar.AsyncState; | 286 | /// so that the caller doesn't wait. |
283 | icon.EndInvoke(iar); | 287 | /// </summary> |
284 | } | 288 | /// <param name="agentID"></param> |
285 | 289 | /// <param name="regionslst"></param> | |
286 | public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst) | 290 | public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst) |
287 | { | 291 | { |
288 | foreach (ulong handle in regionslst) | 292 | Util.FireAndForget(delegate |
289 | { | 293 | { |
290 | SendCloseChildAgentDelegate d = SendCloseChildAgentAsync; | 294 | foreach (ulong handle in regionslst) |
291 | d.BeginInvoke(agentID, handle, | 295 | { |
292 | SendCloseChildAgentCompleted, | 296 | SendCloseChildAgent(agentID, handle); |
293 | d); | 297 | } |
294 | } | 298 | }); |
295 | } | 299 | } |
296 | 300 | ||
297 | public List<GridRegion> RequestNamedRegions(string name, int maxNumber) | 301 | public List<GridRegion> RequestNamedRegions(string name, int maxNumber) |
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 3978a7d..83906d7 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs | |||
@@ -86,6 +86,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
86 | /// <param name="assetUuids">The assets gathered</param> | 86 | /// <param name="assetUuids">The assets gathered</param> |
87 | public void GatherAssetUuids(UUID assetUuid, AssetType assetType, IDictionary<UUID, AssetType> assetUuids) | 87 | public void GatherAssetUuids(UUID assetUuid, AssetType assetType, IDictionary<UUID, AssetType> assetUuids) |
88 | { | 88 | { |
89 | // avoid infinite loops | ||
90 | if (assetUuids.ContainsKey(assetUuid)) | ||
91 | return; | ||
92 | |||
89 | try | 93 | try |
90 | { | 94 | { |
91 | assetUuids[assetUuid] = assetType; | 95 | assetUuids[assetUuid] = assetType; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 8e712b6..783791f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -864,7 +864,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
864 | 864 | ||
865 | public Dictionary<string, object> GetVars() | 865 | public Dictionary<string, object> GetVars() |
866 | { | 866 | { |
867 | return m_Script.GetVars(); | 867 | if (m_Script != null) |
868 | return m_Script.GetVars(); | ||
869 | else | ||
870 | return new Dictionary<string, object>(); | ||
868 | } | 871 | } |
869 | 872 | ||
870 | public void SetVars(Dictionary<string, object> vars) | 873 | public void SetVars(Dictionary<string, object> vars) |