aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/IScene.cs14
-rw-r--r--OpenSim/Region/Application/OpenSim.cs56
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/Tests/MockScene.cs9
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs38
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs2
-rw-r--r--OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs4
-rw-r--r--OpenSim/Tests/Common/Helpers/SceneHelpers.cs2
23 files changed, 103 insertions, 94 deletions
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs
index 8164f41..e1b6d1e 100644
--- a/OpenSim/Framework/IScene.cs
+++ b/OpenSim/Framework/IScene.cs
@@ -86,24 +86,26 @@ namespace OpenSim.Framework
86 event restart OnRestart; 86 event restart OnRestart;
87 87
88 /// <summary> 88 /// <summary>
89 /// Add a new client and create a presence for it. All clients except initial login clients will starts off as a child agent 89 /// Add a new agent with an attached client. All agents except initial login clients will starts off as a child agent
90 /// - the later agent crossing will promote it to a root agent. 90 /// - the later agent crossing will promote it to a root agent.
91 /// </summary> 91 /// </summary>
92 /// <param name="client"></param> 92 /// <param name="client"></param>
93 /// <param name="type">The type of agent to add.</param> 93 /// <param name="type">The type of agent to add.</param>
94 /// <returns> 94 /// <returns>
95 /// The scene agent if the new client was added or if an agent that already existed.</returns> 95 /// The scene agent if the new client was added or if an agent that already existed.</returns>
96 ISceneAgent AddNewClient(IClientAPI client, PresenceType type); 96 ISceneAgent AddNewAgent(IClientAPI client, PresenceType type);
97 97
98 /// <summary> 98 /// <summary>
99 /// Remove the given client from the scene. 99 /// Tell a single agent to disconnect from the region.
100 /// </summary> 100 /// </summary>
101 /// <param name="agentID"></param> 101 /// <param name="agentID"></param>
102 /// <param name="closeChildAgents">Close the neighbour child agents associated with this client.</param> 102 /// <param name="force">
103 void RemoveClient(UUID agentID, bool closeChildAgents); 103 /// Force the agent to close even if it might be in the middle of some other operation. You do not want to
104 /// force unless you are absolutely sure that the agent is dead and a normal close is not working.
105 /// </param>
106 bool CloseAgent(UUID agentID, bool force);
104 107
105 void Restart(); 108 void Restart();
106 //RegionInfo OtherRegionUp(RegionInfo thisRegion);
107 109
108 string GetSimulatorVersion(); 110 string GetSimulatorVersion();
109 111
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index f16b40d..e241274 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -237,27 +237,33 @@ namespace OpenSim
237 237
238 m_console.Commands.AddCommand("General", false, "change region", 238 m_console.Commands.AddCommand("General", false, "change region",
239 "change region <region name>", 239 "change region <region name>",
240 "Change current console region", ChangeSelectedRegion); 240 "Change current console region",
241 ChangeSelectedRegion);
241 242
242 m_console.Commands.AddCommand("Archiving", false, "save xml", 243 m_console.Commands.AddCommand("Archiving", false, "save xml",
243 "save xml", 244 "save xml",
244 "Save a region's data in XML format", SaveXml); 245 "Save a region's data in XML format",
246 SaveXml);
245 247
246 m_console.Commands.AddCommand("Archiving", false, "save xml2", 248 m_console.Commands.AddCommand("Archiving", false, "save xml2",
247 "save xml2", 249 "save xml2",
248 "Save a region's data in XML2 format", SaveXml2); 250 "Save a region's data in XML2 format",
251 SaveXml2);
249 252
250 m_console.Commands.AddCommand("Archiving", false, "load xml", 253 m_console.Commands.AddCommand("Archiving", false, "load xml",
251 "load xml [-newIDs [<x> <y> <z>]]", 254 "load xml [-newIDs [<x> <y> <z>]]",
252 "Load a region's data from XML format", LoadXml); 255 "Load a region's data from XML format",
256 LoadXml);
253 257
254 m_console.Commands.AddCommand("Archiving", false, "load xml2", 258 m_console.Commands.AddCommand("Archiving", false, "load xml2",
255 "load xml2", 259 "load xml2",
256 "Load a region's data from XML2 format", LoadXml2); 260 "Load a region's data from XML2 format",
261 LoadXml2);
257 262
258 m_console.Commands.AddCommand("Archiving", false, "save prims xml2", 263 m_console.Commands.AddCommand("Archiving", false, "save prims xml2",
259 "save prims xml2 [<prim name> <file name>]", 264 "save prims xml2 [<prim name> <file name>]",
260 "Save named prim to XML2", SavePrimsXml2); 265 "Save named prim to XML2",
266 SavePrimsXml2);
261 267
262 m_console.Commands.AddCommand("Archiving", false, "load oar", 268 m_console.Commands.AddCommand("Archiving", false, "load oar",
263 "load oar [--merge] [--skip-assets] [<OAR path>]", 269 "load oar [--merge] [--skip-assets] [<OAR path>]",
@@ -287,7 +293,8 @@ namespace OpenSim
287 293
288 m_console.Commands.AddCommand("Objects", false, "edit scale", 294 m_console.Commands.AddCommand("Objects", false, "edit scale",
289 "edit scale <name> <x> <y> <z>", 295 "edit scale <name> <x> <y> <z>",
290 "Change the scale of a named prim", HandleEditScale); 296 "Change the scale of a named prim",
297 HandleEditScale);
291 298
292 m_console.Commands.AddCommand("Users", false, "kick user", 299 m_console.Commands.AddCommand("Users", false, "kick user",
293 "kick user <first> <last> [--force] [message]", 300 "kick user <first> <last> [--force] [message]",
@@ -305,31 +312,38 @@ namespace OpenSim
305 312
306 m_console.Commands.AddCommand("Comms", false, "show connections", 313 m_console.Commands.AddCommand("Comms", false, "show connections",
307 "show connections", 314 "show connections",
308 "Show connection data", HandleShow); 315 "Show connection data",
316 HandleShow);
309 317
310 m_console.Commands.AddCommand("Comms", false, "show circuits", 318 m_console.Commands.AddCommand("Comms", false, "show circuits",
311 "show circuits", 319 "show circuits",
312 "Show agent circuit data", HandleShow); 320 "Show agent circuit data",
321 HandleShow);
313 322
314 m_console.Commands.AddCommand("Comms", false, "show pending-objects", 323 m_console.Commands.AddCommand("Comms", false, "show pending-objects",
315 "show pending-objects", 324 "show pending-objects",
316 "Show # of objects on the pending queues of all scene viewers", HandleShow); 325 "Show # of objects on the pending queues of all scene viewers",
326 HandleShow);
317 327
318 m_console.Commands.AddCommand("General", false, "show modules", 328 m_console.Commands.AddCommand("General", false, "show modules",
319 "show modules", 329 "show modules",
320 "Show module data", HandleShow); 330 "Show module data",
331 HandleShow);
321 332
322 m_console.Commands.AddCommand("Regions", false, "show regions", 333 m_console.Commands.AddCommand("Regions", false, "show regions",
323 "show regions", 334 "show regions",
324 "Show region data", HandleShow); 335 "Show region data",
336 HandleShow);
325 337
326 m_console.Commands.AddCommand("Regions", false, "show ratings", 338 m_console.Commands.AddCommand("Regions", false, "show ratings",
327 "show ratings", 339 "show ratings",
328 "Show rating data", HandleShow); 340 "Show rating data",
341 HandleShow);
329 342
330 m_console.Commands.AddCommand("Objects", false, "backup", 343 m_console.Commands.AddCommand("Objects", false, "backup",
331 "backup", 344 "backup",
332 "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", RunCommand); 345 "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.",
346 RunCommand);
333 347
334 m_console.Commands.AddCommand("Regions", false, "create region", 348 m_console.Commands.AddCommand("Regions", false, "create region",
335 "create region [\"region name\"] <region_file.ini>", 349 "create region [\"region name\"] <region_file.ini>",
@@ -342,19 +356,23 @@ namespace OpenSim
342 356
343 m_console.Commands.AddCommand("Regions", false, "restart", 357 m_console.Commands.AddCommand("Regions", false, "restart",
344 "restart", 358 "restart",
345 "Restart all sims in this instance", RunCommand); 359 "Restart all sims in this instance",
360 RunCommand);
346 361
347 m_console.Commands.AddCommand("General", false, "command-script", 362 m_console.Commands.AddCommand("General", false, "command-script",
348 "command-script <script>", 363 "command-script <script>",
349 "Run a command script from file", RunCommand); 364 "Run a command script from file",
365 RunCommand);
350 366
351 m_console.Commands.AddCommand("Regions", false, "remove-region", 367 m_console.Commands.AddCommand("Regions", false, "remove-region",
352 "remove-region <name>", 368 "remove-region <name>",
353 "Remove a region from this simulator", RunCommand); 369 "Remove a region from this simulator",
370 RunCommand);
354 371
355 m_console.Commands.AddCommand("Regions", false, "delete-region", 372 m_console.Commands.AddCommand("Regions", false, "delete-region",
356 "delete-region <name>", 373 "delete-region <name>",
357 "Delete a region from disk", RunCommand); 374 "Delete a region from disk",
375 RunCommand);
358 } 376 }
359 377
360 protected override void ShutdownSpecific() 378 protected override void ShutdownSpecific()
@@ -434,7 +452,7 @@ namespace OpenSim
434 else 452 else
435 presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); 453 presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n");
436 454
437 presence.Scene.IncomingCloseAgent(presence.UUID, force); 455 presence.Scene.CloseAgent(presence.UUID, force);
438 break; 456 break;
439 } 457 }
440 } 458 }
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
index b3b0b8a..9e24bce 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
@@ -96,7 +96,7 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
96 UUID spId = TestHelpers.ParseTail(0x1); 96 UUID spId = TestHelpers.ParseTail(0x1);
97 97
98 SceneHelpers.AddScenePresence(m_scene, spId); 98 SceneHelpers.AddScenePresence(m_scene, spId);
99 m_scene.IncomingCloseAgent(spId, false); 99 m_scene.CloseAgent(spId, false);
100 100
101 // TODO: Add more assertions for the other aspects of event queues 101 // TODO: Add more assertions for the other aspects of event queues
102 Assert.That(MainServer.Instance.GetPollServiceHandlerKeys().Count, Is.EqualTo(0)); 102 Assert.That(MainServer.Instance.GetPollServiceHandlerKeys().Count, Is.EqualTo(0));
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 3396c32..fea9ddf 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -750,7 +750,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
750 750
751 public virtual void Start() 751 public virtual void Start()
752 { 752 {
753 m_scene.AddNewClient(this, PresenceType.User); 753 m_scene.AddNewAgent(this, PresenceType.User);
754 754
755 RefreshGroupMembership(); 755 RefreshGroupMembership();
756 } 756 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 9504f15..8d957dc 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1718,7 +1718,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1718 else if (client.SceneAgent == null) 1718 else if (client.SceneAgent == null)
1719 { 1719 {
1720 // This check exists to catch a condition where the new client has been added to the client 1720 // This check exists to catch a condition where the new client has been added to the client
1721 // manager but the SceneAgent has not yet been set in Scene.AddNewClient(). If we are too 1721 // manager but the SceneAgent has not yet been set in Scene.AddNewAgent(). If we are too
1722 // eager, then the new ScenePresence may not have registered a listener for this messsage 1722 // eager, then the new ScenePresence may not have registered a listener for this messsage
1723 // before we try to process it. 1723 // before we try to process it.
1724 // XXX: A better long term fix may be to add the SceneAgent before the client is added to 1724 // XXX: A better long term fix may be to add the SceneAgent before the client is added to
@@ -1893,7 +1893,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1893 client.Kick("Simulator logged you out due to connection timeout."); 1893 client.Kick("Simulator logged you out due to connection timeout.");
1894 } 1894 }
1895 1895
1896 m_scene.IncomingCloseAgent(client.AgentId, true); 1896 m_scene.CloseAgent(client.AgentId, true);
1897 } 1897 }
1898 1898
1899 private void IncomingPacketHandler() 1899 private void IncomingPacketHandler()
@@ -2234,7 +2234,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2234 if (!client.IsLoggingOut) 2234 if (!client.IsLoggingOut)
2235 { 2235 {
2236 client.IsLoggingOut = true; 2236 client.IsLoggingOut = true;
2237 m_scene.IncomingCloseAgent(client.AgentId, false); 2237 m_scene.CloseAgent(client.AgentId, false);
2238 } 2238 }
2239 } 2239 }
2240 } 2240 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/MockScene.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/MockScene.cs
index 119a677..e2178e5 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/MockScene.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/MockScene.cs
@@ -52,17 +52,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
52 public override void Update(int frames) {} 52 public override void Update(int frames) {}
53 public override void LoadWorldMap() {} 53 public override void LoadWorldMap() {}
54 54
55 public override ISceneAgent AddNewClient(IClientAPI client, PresenceType type) 55 public override ISceneAgent AddNewAgent(IClientAPI client, PresenceType type)
56 { 56 {
57 client.OnObjectName += RecordObjectNameCall; 57 client.OnObjectName += RecordObjectNameCall;
58 58
59 // FIXME 59 // FIXME
60 return null; 60 return null;
61 } 61 }
62 62
63 public override void RemoveClient(UUID agentID, bool someReason) {} 63 public override bool CloseAgent(UUID agentID, bool force) { return true; }
64// public override void CloseAllAgents(uint circuitcode) {} 64
65 public override bool CheckClient(UUID clientId, IPEndPoint endPoint) { return true; } 65 public override bool CheckClient(UUID clientId, IPEndPoint endPoint) { return true; }
66
66 public override void OtherRegionUp(GridRegion otherRegion) { } 67 public override void OtherRegionUp(GridRegion otherRegion) { }
67 68
68 public override bool TryGetScenePresence(UUID uuid, out ScenePresence sp) { sp = null; return false; } 69 public override bool TryGetScenePresence(UUID uuid, out ScenePresence sp) { sp = null; return false; }
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index fd493fc..4e58045 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -719,7 +719,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
719 SceneObjectGroup rezzedAtt = presence.GetAttachments()[0]; 719 SceneObjectGroup rezzedAtt = presence.GetAttachments()[0];
720 720
721 m_numberOfAttachEventsFired = 0; 721 m_numberOfAttachEventsFired = 0;
722 scene.IncomingCloseAgent(presence.UUID, false); 722 scene.CloseAgent(presence.UUID, false);
723 723
724 // Check that we can't retrieve this attachment from the scene. 724 // Check that we can't retrieve this attachment from the scene.
725 Assert.That(scene.GetSceneObjectGroup(rezzedAtt.UUID), Is.Null); 725 Assert.That(scene.GetSceneObjectGroup(rezzedAtt.UUID), Is.Null);
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
index 0cd495c..3b6d970 100644
--- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
@@ -272,7 +272,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
272 if (sp.IsChildAgent) 272 if (sp.IsChildAgent)
273 return; 273 return;
274 sp.ControllingClient.Kick(reason); 274 sp.ControllingClient.Kick(reason);
275 sp.Scene.IncomingCloseAgent(sp.UUID, true); 275 sp.Scene.CloseAgent(sp.UUID, true);
276 } 276 }
277 277
278 private void OnIncomingInstantMessage(GridInstantMessage msg) 278 private void OnIncomingInstantMessage(GridInstantMessage msg)
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 38c4d17..eb1b271 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -972,7 +972,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
972 972
973 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 973 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
974 { 974 {
975 if (!sp.Scene.IncomingPreCloseAgent(sp)) 975 if (!sp.Scene.IncomingPreCloseClient(sp))
976 return; 976 return;
977 977
978 // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before 978 // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before
@@ -983,7 +983,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
983 // an agent cannot teleport back to this region if it has teleported away. 983 // an agent cannot teleport back to this region if it has teleported away.
984 Thread.Sleep(2000); 984 Thread.Sleep(2000);
985 985
986 sp.Scene.IncomingCloseAgent(sp.UUID, false); 986 sp.Scene.CloseAgent(sp.UUID, false);
987 } 987 }
988 else 988 else
989 { 989 {
@@ -1137,7 +1137,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1137 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone 1137 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
1138 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 1138 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
1139 { 1139 {
1140 if (!sp.Scene.IncomingPreCloseAgent(sp)) 1140 if (!sp.Scene.IncomingPreCloseClient(sp))
1141 return; 1141 return;
1142 1142
1143 // RED ALERT!!!! 1143 // RED ALERT!!!!
@@ -1154,7 +1154,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1154 m_log.DebugFormat( 1154 m_log.DebugFormat(
1155 "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); 1155 "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name);
1156 1156
1157 sp.Scene.IncomingCloseAgent(sp.UUID, false); 1157 sp.Scene.CloseAgent(sp.UUID, false);
1158 } 1158 }
1159 else 1159 else
1160 { 1160 {
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index 76dbc72..04a0db6 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -181,7 +181,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
181 if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) 181 if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
182 { 182 {
183 string url = aCircuit.ServiceURLs["AssetServerURI"].ToString(); 183 string url = aCircuit.ServiceURLs["AssetServerURI"].ToString();
184 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachement {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url); 184 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url);
185 Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>(); 185 Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>();
186 HGUuidGatherer uuidGatherer = new HGUuidGatherer(Scene.AssetService, url); 186 HGUuidGatherer uuidGatherer = new HGUuidGatherer(Scene.AssetService, url);
187 uuidGatherer.GatherAssetUuids(so, ids); 187 uuidGatherer.GatherAssetUuids(so, ids);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 5c098a8..678f3dc 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -311,7 +311,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
311// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", 311// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
312// s.RegionInfo.RegionName, destination.RegionHandle); 312// s.RegionInfo.RegionName, destination.RegionHandle);
313 313
314 m_scenes[destination.RegionID].IncomingCloseAgent(id, false, auth_token); 314 m_scenes[destination.RegionID].CloseAgent(id, false, auth_token);
315 return true; 315 return true;
316 } 316 }
317 317
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 31547a6..42db1cf 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -562,7 +562,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
562 if (!Scene.TeleportClientHome(user, s.ControllingClient)) 562 if (!Scene.TeleportClientHome(user, s.ControllingClient))
563 { 563 {
564 s.ControllingClient.Kick("Your access to the region was revoked and TP home failed - you have been logged out."); 564 s.ControllingClient.Kick("Your access to the region was revoked and TP home failed - you have been logged out.");
565 Scene.IncomingCloseAgent(s.UUID, false); 565 Scene.CloseAgent(s.UUID, false);
566 } 566 }
567 } 567 }
568 } 568 }
@@ -797,7 +797,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
797 if (!Scene.TeleportClientHome(prey, s.ControllingClient)) 797 if (!Scene.TeleportClientHome(prey, s.ControllingClient))
798 { 798 {
799 s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out."); 799 s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out.");
800 Scene.IncomingCloseAgent(s.UUID, false); 800 Scene.CloseAgent(s.UUID, false);
801 } 801 }
802 } 802 }
803 } 803 }
@@ -820,7 +820,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
820 if (!Scene.TeleportClientHome(p.UUID, p.ControllingClient)) 820 if (!Scene.TeleportClientHome(p.UUID, p.ControllingClient))
821 { 821 {
822 p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out."); 822 p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out.");
823 Scene.IncomingCloseAgent(p.UUID, false); 823 Scene.CloseAgent(p.UUID, false);
824 } 824 }
825 } 825 }
826 } 826 }
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 39d7512..37b5776 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Framework.Scenes
144 /// Triggered when a new presence is added to the scene 144 /// Triggered when a new presence is added to the scene
145 /// </summary> 145 /// </summary>
146 /// <remarks> 146 /// <remarks>
147 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> which is used by both 147 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewAgent"/> which is used by both
148 /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> 148 /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see>
149 /// </remarks> 149 /// </remarks>
150 public event OnNewPresenceDelegate OnNewPresence; 150 public event OnNewPresenceDelegate OnNewPresence;
@@ -155,7 +155,7 @@ namespace OpenSim.Region.Framework.Scenes
155 /// Triggered when a presence is removed from the scene 155 /// Triggered when a presence is removed from the scene
156 /// </summary> 156 /// </summary>
157 /// <remarks> 157 /// <remarks>
158 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> which is used by both 158 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewAgent"/> which is used by both
159 /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> 159 /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see>
160 /// 160 ///
161 /// Triggered under per-agent lock. So if you want to perform any long-running operations, please 161 /// Triggered under per-agent lock. So if you want to perform any long-running operations, please
@@ -1102,7 +1102,7 @@ namespace OpenSim.Region.Framework.Scenes
1102 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.ProcessMoneyTransferRequest"/> 1102 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.ProcessMoneyTransferRequest"/>
1103 /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.SubscribeToClientGridEvents"/> 1103 /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.SubscribeToClientGridEvents"/>
1104 /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.SubscribeToClientEvents"/> 1104 /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.SubscribeToClientEvents"/>
1105 /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> 1105 /// via <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewAgent"/>
1106 /// </remarks> 1106 /// </remarks>
1107 public event MoneyTransferEvent OnMoneyTransfer; 1107 public event MoneyTransferEvent OnMoneyTransfer;
1108 1108
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index b714c7f..49e32c6 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1313,7 +1313,7 @@ namespace OpenSim.Region.Framework.Scenes
1313 Thread.Sleep(500); 1313 Thread.Sleep(500);
1314 1314
1315 // Stop all client threads. 1315 // Stop all client threads.
1316 ForEachScenePresence(delegate(ScenePresence avatar) { IncomingCloseAgent(avatar.UUID, false); }); 1316 ForEachScenePresence(delegate(ScenePresence avatar) { CloseAgent(avatar.UUID, false); });
1317 1317
1318 m_log.Debug("[SCENE]: Persisting changed objects"); 1318 m_log.Debug("[SCENE]: Persisting changed objects");
1319 EventManager.TriggerSceneShuttingDown(this); 1319 EventManager.TriggerSceneShuttingDown(this);
@@ -2802,7 +2802,7 @@ namespace OpenSim.Region.Framework.Scenes
2802 2802
2803 #region Add/Remove Avatar Methods 2803 #region Add/Remove Avatar Methods
2804 2804
2805 public override ISceneAgent AddNewClient(IClientAPI client, PresenceType type) 2805 public override ISceneAgent AddNewAgent(IClientAPI client, PresenceType type)
2806 { 2806 {
2807 ScenePresence sp; 2807 ScenePresence sp;
2808 bool vialogin; 2808 bool vialogin;
@@ -2810,7 +2810,7 @@ namespace OpenSim.Region.Framework.Scenes
2810 2810
2811 // Validation occurs in LLUDPServer 2811 // Validation occurs in LLUDPServer
2812 // 2812 //
2813 // XXX: A race condition exists here where two simultaneous calls to AddNewClient can interfere with 2813 // XXX: A race condition exists here where two simultaneous calls to AddNewAgent can interfere with
2814 // each other. In practice, this does not currently occur in the code. 2814 // each other. In practice, this does not currently occur in the code.
2815 AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode); 2815 AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode);
2816 2816
@@ -2818,9 +2818,9 @@ namespace OpenSim.Region.Framework.Scenes
2818 // and a simultaneous one that removes it (as can happen if the client is closed at a particular point 2818 // and a simultaneous one that removes it (as can happen if the client is closed at a particular point
2819 // whilst connecting). 2819 // whilst connecting).
2820 // 2820 //
2821 // It would be easier to lock across all NewUserConnection(), AddNewClient() and 2821 // It would be easier to lock across all NewUserConnection(), AddNewAgent() and
2822 // RemoveClient() calls for all agents, but this would allow a slow call (e.g. because of slow service 2822 // RemoveClient() calls for all agents, but this would allow a slow call (e.g. because of slow service
2823 // response in some module listening to AddNewClient()) from holding up unrelated agent calls. 2823 // response in some module listening to AddNewAgent()) from holding up unrelated agent calls.
2824 // 2824 //
2825 // In practice, the lock (this) in LLUDPServer.AddNewClient() currently lock across all 2825 // In practice, the lock (this) in LLUDPServer.AddNewClient() currently lock across all
2826 // AddNewClient() operations (though not other ops). 2826 // AddNewClient() operations (though not other ops).
@@ -2837,7 +2837,7 @@ namespace OpenSim.Region.Framework.Scenes
2837 2837
2838 // XXX: Not sure how good it is to add a new client if a scene presence already exists. Possibly this 2838 // XXX: Not sure how good it is to add a new client if a scene presence already exists. Possibly this
2839 // could occur if a viewer crashes and relogs before the old client is kicked out. But this could cause 2839 // could occur if a viewer crashes and relogs before the old client is kicked out. But this could cause
2840 // other problems, and possible the code calling AddNewClient() should ensure that no client is already 2840 // other problems, and possibly the code calling AddNewAgent() should ensure that no client is already
2841 // connected. 2841 // connected.
2842 if (sp == null) 2842 if (sp == null)
2843 { 2843 {
@@ -2976,7 +2976,7 @@ namespace OpenSim.Region.Framework.Scenes
2976 { 2976 {
2977 PresenceService.LogoutAgent(sp.ControllingClient.SessionId); 2977 PresenceService.LogoutAgent(sp.ControllingClient.SessionId);
2978 2978
2979 IncomingCloseAgent(sp.UUID, false); 2979 CloseAgent(sp.UUID, false);
2980 } 2980 }
2981 else 2981 else
2982 { 2982 {
@@ -3398,7 +3398,7 @@ namespace OpenSim.Region.Framework.Scenes
3398 /// <param name='closeChildAgents'> 3398 /// <param name='closeChildAgents'>
3399 /// Close the neighbour child agents associated with this client. 3399 /// Close the neighbour child agents associated with this client.
3400 /// </param> 3400 /// </param>
3401 public override void RemoveClient(UUID agentID, bool closeChildAgents) 3401 public void RemoveClient(UUID agentID, bool closeChildAgents)
3402 { 3402 {
3403 AgentCircuitData acd = m_authenticateHandler.GetAgentCircuitData(agentID); 3403 AgentCircuitData acd = m_authenticateHandler.GetAgentCircuitData(agentID);
3404 3404
@@ -3783,7 +3783,7 @@ namespace OpenSim.Region.Framework.Scenes
3783 sp.Name, sp.UUID, RegionInfo.RegionName); 3783 sp.Name, sp.UUID, RegionInfo.RegionName);
3784 3784
3785 if (sp.ControllingClient != null) 3785 if (sp.ControllingClient != null)
3786 IncomingCloseAgent(sp.UUID, true); 3786 CloseAgent(sp.UUID, true);
3787 3787
3788 sp = null; 3788 sp = null;
3789 } 3789 }
@@ -4306,7 +4306,7 @@ namespace OpenSim.Region.Framework.Scenes
4306 // We have to wait until the viewer contacts this region 4306 // We have to wait until the viewer contacts this region
4307 // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol) 4307 // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol)
4308 // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send 4308 // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send
4309 // a UseCircuitCode packet which in turn calls AddNewClient which finally creates the ScenePresence. 4309 // a UseCircuitCode packet which in turn calls AddNewAgent which finally creates the ScenePresence.
4310 ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID); 4310 ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID);
4311 4311
4312 if (sp != null) 4312 if (sp != null)
@@ -4424,7 +4424,7 @@ namespace OpenSim.Region.Framework.Scenes
4424 /// <param name="force"></param> 4424 /// <param name="force"></param>
4425 /// <param name="auth_token"></param> 4425 /// <param name="auth_token"></param>
4426 /// <returns></returns> 4426 /// <returns></returns>
4427 public bool IncomingCloseAgent(UUID agentID, bool force, string auth_token) 4427 public bool CloseAgent(UUID agentID, bool force, string auth_token)
4428 { 4428 {
4429 //m_log.DebugFormat("[SCENE]: Processing incoming close agent {0} in region {1} with auth_token {2}", agentID, RegionInfo.RegionName, auth_token); 4429 //m_log.DebugFormat("[SCENE]: Processing incoming close agent {0} in region {1} with auth_token {2}", agentID, RegionInfo.RegionName, auth_token);
4430 4430
@@ -4442,7 +4442,7 @@ namespace OpenSim.Region.Framework.Scenes
4442 4442
4443 if (acd.SessionID.ToString() == auth_token) 4443 if (acd.SessionID.ToString() == auth_token)
4444 { 4444 {
4445 return IncomingCloseAgent(agentID, force); 4445 return CloseAgent(agentID, force);
4446 } 4446 }
4447 else 4447 else
4448 { 4448 {
@@ -4455,16 +4455,16 @@ namespace OpenSim.Region.Framework.Scenes
4455 } 4455 }
4456 4456
4457 /// <summary> 4457 /// <summary>
4458 /// Tell a single agent to prepare to close. 4458 /// Tell a single client to prepare to close.
4459 /// </summary> 4459 /// </summary>
4460 /// <remarks> 4460 /// <remarks>
4461 /// This should only be called if we may close the agent but there will be some delay in so doing. Meant for 4461 /// This should only be called if we may close the client but there will be some delay in so doing. Meant for
4462 /// internal use - other callers should almost certainly called IncomingCloseAgent(). 4462 /// internal use - other callers should almost certainly called CloseClient().
4463 /// </remarks> 4463 /// </remarks>
4464 /// <param name="sp"></param> 4464 /// <param name="sp"></param>
4465 /// <returns>true if pre-close state notification was successful. false if the agent 4465 /// <returns>true if pre-close state notification was successful. false if the agent
4466 /// was not in a state where it could transition to pre-close.</returns> 4466 /// was not in a state where it could transition to pre-close.</returns>
4467 public bool IncomingPreCloseAgent(ScenePresence sp) 4467 public bool IncomingPreCloseClient(ScenePresence sp)
4468 { 4468 {
4469 lock (m_removeClientLock) 4469 lock (m_removeClientLock)
4470 { 4470 {
@@ -4506,7 +4506,7 @@ namespace OpenSim.Region.Framework.Scenes
4506 /// Force the agent to close even if it might be in the middle of some other operation. You do not want to 4506 /// Force the agent to close even if it might be in the middle of some other operation. You do not want to
4507 /// force unless you are absolutely sure that the agent is dead and a normal close is not working. 4507 /// force unless you are absolutely sure that the agent is dead and a normal close is not working.
4508 /// </param> 4508 /// </param>
4509 public bool IncomingCloseAgent(UUID agentID, bool force) 4509 public override bool CloseAgent(UUID agentID, bool force)
4510 { 4510 {
4511 ScenePresence sp; 4511 ScenePresence sp;
4512 4512
@@ -4517,7 +4517,7 @@ namespace OpenSim.Region.Framework.Scenes
4517 if (sp == null) 4517 if (sp == null)
4518 { 4518 {
4519 m_log.DebugFormat( 4519 m_log.DebugFormat(
4520 "[SCENE]: Called IncomingCloseAgent() with agent ID {0} but no such presence is in {1}", 4520 "[SCENE]: Called CloseClient() with agent ID {0} but no such presence is in {1}",
4521 agentID, Name); 4521 agentID, Name);
4522 4522
4523 return false; 4523 return false;
@@ -4526,7 +4526,7 @@ namespace OpenSim.Region.Framework.Scenes
4526 if (sp.LifecycleState != ScenePresenceState.Running && sp.LifecycleState != ScenePresenceState.PreRemove) 4526 if (sp.LifecycleState != ScenePresenceState.Running && sp.LifecycleState != ScenePresenceState.PreRemove)
4527 { 4527 {
4528 m_log.DebugFormat( 4528 m_log.DebugFormat(
4529 "[SCENE]: Called IncomingCloseAgent() for {0} in {1} but presence is already in state {2}", 4529 "[SCENE]: Called CloseClient() for {0} in {1} but presence is already in state {2}",
4530 sp.Name, Name, sp.LifecycleState); 4530 sp.Name, Name, sp.LifecycleState);
4531 4531
4532 return false; 4532 return false;
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index 5252b96..4f04706 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -216,21 +216,9 @@ namespace OpenSim.Region.Framework.Scenes
216 216
217 #region Add/Remove Agent/Avatar 217 #region Add/Remove Agent/Avatar
218 218
219 public abstract ISceneAgent AddNewClient(IClientAPI client, PresenceType type); 219 public abstract ISceneAgent AddNewAgent(IClientAPI client, PresenceType type);
220 220
221 /// <summary> 221 public abstract bool CloseAgent(UUID agentID, bool force);
222 /// Remove the given client from the scene.
223 /// </summary>
224 /// <remarks>
225 /// Only clientstack code should call this directly. All other code should call IncomingCloseAgent() instead
226 /// to properly operate the state machine and avoid race conditions with other close requests (such as directly
227 /// from viewers).
228 /// </remarks>
229 /// <param name='agentID'>ID of agent to close</param>
230 /// <param name='closeChildAgents'>
231 /// Close the neighbour child agents associated with this client.
232 /// </param>
233 public abstract void RemoveClient(UUID agentID, bool closeChildAgents);
234 222
235 public bool TryGetScenePresence(UUID agentID, out object scenePresence) 223 public bool TryGetScenePresence(UUID agentID, out object scenePresence)
236 { 224 {
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index bbe34d2..d1aeaee 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -146,7 +146,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
146 } 146 }
147 147
148 [Test] 148 [Test]
149 public void TestCloseAgent() 149 public void TestCloseClient()
150 { 150 {
151 TestHelpers.InMethod(); 151 TestHelpers.InMethod();
152// TestHelpers.EnableLogging(); 152// TestHelpers.EnableLogging();
@@ -154,7 +154,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
154 TestScene scene = new SceneHelpers().SetupScene(); 154 TestScene scene = new SceneHelpers().SetupScene();
155 ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); 155 ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1));
156 156
157 scene.IncomingCloseAgent(sp.UUID, false); 157 scene.CloseAgent(sp.UUID, false);
158 158
159 Assert.That(scene.GetScenePresence(sp.UUID), Is.Null); 159 Assert.That(scene.GetScenePresence(sp.UUID), Is.Null);
160 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(sp.UUID), Is.Null); 160 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(sp.UUID), Is.Null);
@@ -200,7 +200,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
200 // *** This is the second stage, where the client established a child agent/scene presence using the 200 // *** This is the second stage, where the client established a child agent/scene presence using the
201 // circuit code given to the scene in stage 1 *** 201 // circuit code given to the scene in stage 1 ***
202 TestClient client = new TestClient(acd, scene); 202 TestClient client = new TestClient(acd, scene);
203 scene.AddNewClient(client, PresenceType.User); 203 scene.AddNewAgent(client, PresenceType.User);
204 204
205 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(agentId), Is.Not.Null); 205 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(agentId), Is.Not.Null);
206 Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1)); 206 Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1));
@@ -279,7 +279,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
279// string reason; 279// string reason;
280// scene.NewUserConnection(agent, (uint)TeleportFlags.ViaLogin, out reason); 280// scene.NewUserConnection(agent, (uint)TeleportFlags.ViaLogin, out reason);
281// testclient = new TestClient(agent, scene); 281// testclient = new TestClient(agent, scene);
282// scene.AddNewClient(testclient); 282// scene.AddNewAgent(testclient);
283// 283//
284// ScenePresence presence = scene.GetScenePresence(agent1); 284// ScenePresence presence = scene.GetScenePresence(agent1);
285// 285//
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs
index b6fb730..4fdfc74 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
79 79
80 // TODO: Need to add tests for other ICapabiltiesModule methods. 80 // TODO: Need to add tests for other ICapabiltiesModule methods.
81 81
82 scene.IncomingCloseAgent(sp.UUID, false); 82 scene.CloseAgent(sp.UUID, false);
83 Assert.That(capsMod.GetCapsForUser(spUuid), Is.Null); 83 Assert.That(capsMod.GetCapsForUser(spUuid), Is.Null);
84 84
85 // TODO: Need to add tests for other ICapabiltiesModule methods. 85 // TODO: Need to add tests for other ICapabiltiesModule methods.
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index 3ba34dd..8c25dbc 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -185,7 +185,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
185 public void TestSameSimulatorIsolatedRegionsV2() 185 public void TestSameSimulatorIsolatedRegionsV2()
186 { 186 {
187 TestHelpers.InMethod(); 187 TestHelpers.InMethod();
188 TestHelpers.EnableLogging(); 188// TestHelpers.EnableLogging();
189 189
190 UUID userId = TestHelpers.ParseTail(0x1); 190 UUID userId = TestHelpers.ParseTail(0x1);
191 191
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 23a435d..a4fc4ae 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -903,7 +903,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
903 903
904 public void Start() 904 public void Start()
905 { 905 {
906 m_scene.AddNewClient(this, PresenceType.User); 906 m_scene.AddNewAgent(this, PresenceType.User);
907 907
908 // Mimicking LLClientView which gets always set appearance from client. 908 // Mimicking LLClientView which gets always set appearance from client.
909 AvatarAppearance appearance; 909 AvatarAppearance appearance;
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index b863370..fffe1ab 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -175,7 +175,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
175 { 175 {
176 scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, 176 scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode,
177 acd); 177 acd);
178 scene.AddNewClient(npcAvatar, PresenceType.Npc); 178 scene.AddNewAgent(npcAvatar, PresenceType.Npc);
179 179
180 ScenePresence sp; 180 ScenePresence sp;
181 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) 181 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp))
@@ -384,7 +384,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
384 agentID, av.Name); 384 agentID, av.Name);
385 */ 385 */
386 386
387 scene.IncomingCloseAgent(agentID, false); 387 scene.CloseAgent(agentID, false);
388 388
389 m_avatars.Remove(agentID); 389 m_avatars.Remove(agentID);
390 390
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 415166a..f4d5562 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2964,7 +2964,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2964 sp.ControllingClient.Kick(alert); 2964 sp.ControllingClient.Kick(alert);
2965 2965
2966 // ...and close on our side 2966 // ...and close on our side
2967 sp.Scene.IncomingCloseAgent(sp.UUID, false); 2967 sp.Scene.CloseAgent(sp.UUID, false);
2968 } 2968 }
2969 }); 2969 });
2970 } 2970 }
diff --git a/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs b/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs
index ff6608d..52a17e7 100644
--- a/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Tests.Common
84 84
85 TestClient neighbourTc = new TestClient(newAgent, neighbourScene); 85 TestClient neighbourTc = new TestClient(newAgent, neighbourScene);
86 neighbourTcs.Add(neighbourTc); 86 neighbourTcs.Add(neighbourTc);
87 neighbourScene.AddNewClient(neighbourTc, PresenceType.User); 87 neighbourScene.AddNewAgent(neighbourTc, PresenceType.User);
88 }; 88 };
89 } 89 }
90 90
@@ -119,7 +119,7 @@ namespace OpenSim.Tests.Common
119 119
120 TestClient destinationClient = new TestClient(newAgent, destinationScene); 120 TestClient destinationClient = new TestClient(newAgent, destinationScene);
121 destinationClients.Add(destinationClient); 121 destinationClients.Add(destinationClient);
122 destinationScene.AddNewClient(destinationClient, PresenceType.User); 122 destinationScene.AddNewAgent(destinationClient, PresenceType.User);
123 123
124 ThreadPool.UnsafeQueueUserWorkItem(o => destinationClient.CompleteMovement(), null); 124 ThreadPool.UnsafeQueueUserWorkItem(o => destinationClient.CompleteMovement(), null);
125 }; 125 };
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
index d9bb85e..4cdfe98 100644
--- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
@@ -548,7 +548,7 @@ namespace OpenSim.Tests.Common
548 Console.WriteLine("NewUserConnection failed: " + reason); 548 Console.WriteLine("NewUserConnection failed: " + reason);
549 549
550 // Stage 2: add the new client as a child agent to the scene 550 // Stage 2: add the new client as a child agent to the scene
551 scene.AddNewClient(client, PresenceType.User); 551 scene.AddNewAgent(client, PresenceType.User);
552 552
553 return scene.GetScenePresence(client.AgentId); 553 return scene.GetScenePresence(client.AgentId);
554 } 554 }