diff options
author | Melanie | 2009-12-30 00:27:34 +0100 |
---|---|---|
committer | Melanie | 2009-12-30 00:27:34 +0100 |
commit | a08360e3cd06a266eef0030a3f04bab295a6e4ca (patch) | |
tree | a2af13489f9bc048a018e3ede3a05e0afb5e3f6a | |
parent | Fix a timer list locking issue causing XMREngine deadlocks (diff) | |
parent | Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff) | |
download | opensim-SC-a08360e3cd06a266eef0030a3f04bab295a6e4ca.zip opensim-SC-a08360e3cd06a266eef0030a3f04bab295a6e4ca.tar.gz opensim-SC-a08360e3cd06a266eef0030a3f04bab295a6e4ca.tar.bz2 opensim-SC-a08360e3cd06a266eef0030a3f04bab295a6e4ca.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
13 files changed, 44 insertions, 26 deletions
diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs index efae234..9075f15 100644 --- a/OpenSim/Client/Linden/LLProxyLoginModule.cs +++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs | |||
@@ -268,7 +268,7 @@ namespace OpenSim.Client.Linden | |||
268 | else | 268 | else |
269 | { | 269 | { |
270 | string reason; | 270 | string reason; |
271 | if (scene.NewUserConnection(agentData, out reason)) | 271 | if (scene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason)) |
272 | { | 272 | { |
273 | success = true; | 273 | success = true; |
274 | } | 274 | } |
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs index 8739ce5..8047f74 100644 --- a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs +++ b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs | |||
@@ -199,7 +199,7 @@ namespace OpenSim.Client.Linden | |||
199 | Scene scene; | 199 | Scene scene; |
200 | if (TryGetRegion(regionHandle, out scene)) | 200 | if (TryGetRegion(regionHandle, out scene)) |
201 | { | 201 | { |
202 | return scene.NewUserConnection(agent, out reason); | 202 | return scene.NewUserConnection(agent, (uint)TeleportFlags.ViaLogin, out reason); |
203 | } | 203 | } |
204 | reason = "Region not found."; | 204 | reason = "Region not found."; |
205 | return false; | 205 | return false; |
diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs index 63381a4..7d71f18 100644 --- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs +++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs | |||
@@ -609,7 +609,7 @@ namespace OpenSim.Client.MXP.PacketHandler | |||
609 | agent.Appearance = new AvatarAppearance(); | 609 | agent.Appearance = new AvatarAppearance(); |
610 | } | 610 | } |
611 | 611 | ||
612 | return scene.NewUserConnection(agent, out reason); | 612 | return scene.NewUserConnection(agent, 0, out reason); |
613 | } | 613 | } |
614 | 614 | ||
615 | public void PrintDebugInformation() | 615 | public void PrintDebugInformation() |
diff --git a/OpenSim/Framework/Communications/Clients/RegionClient.cs b/OpenSim/Framework/Communications/Clients/RegionClient.cs index 297b046..5ceaf39 100644 --- a/OpenSim/Framework/Communications/Clients/RegionClient.cs +++ b/OpenSim/Framework/Communications/Clients/RegionClient.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications.Clients | |||
45 | { | 45 | { |
46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
48 | public bool DoCreateChildAgentCall(GridRegion region, AgentCircuitData aCircuit, string authKey, out string reason) | 48 | public bool DoCreateChildAgentCall(GridRegion region, AgentCircuitData aCircuit, string authKey, uint teleportFlags, out string reason) |
49 | { | 49 | { |
50 | reason = String.Empty; | 50 | reason = String.Empty; |
51 | 51 | ||
@@ -83,7 +83,8 @@ namespace OpenSim.Framework.Communications.Clients | |||
83 | } | 83 | } |
84 | // Add the regionhandle of the destination region | 84 | // Add the regionhandle of the destination region |
85 | ulong regionHandle = GetRegionHandle(region.RegionHandle); | 85 | ulong regionHandle = GetRegionHandle(region.RegionHandle); |
86 | args["destination_handle"] = OSD.FromString(regionHandle.ToString()); | 86 | args["destination_handle"] = OSD.FromString(regionHandle.ToString()); |
87 | args["teleport_flags"] = OSD.FromString(teleportFlags.ToString()); | ||
87 | 88 | ||
88 | string strBuffer = ""; | 89 | string strBuffer = ""; |
89 | byte[] buffer = new byte[1]; | 90 | byte[] buffer = new byte[1]; |
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs index c727cec..10a3232 100644 --- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs | |||
@@ -557,7 +557,7 @@ namespace OpenSim.Region.CoreModules.InterGrid | |||
557 | 557 | ||
558 | // Call 'new user' event handler | 558 | // Call 'new user' event handler |
559 | string reason; | 559 | string reason; |
560 | if (!homeScene.NewUserConnection(agentData, out reason)) | 560 | if (!homeScene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason)) |
561 | { | 561 | { |
562 | responseMap["connect"] = OSD.FromBoolean(false); | 562 | responseMap["connect"] = OSD.FromBoolean(false); |
563 | responseMap["message"] = OSD.FromString(String.Format("Connection refused: {0}", reason)); | 563 | responseMap["message"] = OSD.FromString(String.Format("Connection refused: {0}", reason)); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs index bdfe3b1..d68c683 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs | |||
@@ -144,7 +144,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
144 | * Agent-related communications | 144 | * Agent-related communications |
145 | */ | 145 | */ |
146 | 146 | ||
147 | public bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, out string reason) | 147 | public bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, uint teleportFlags, out string reason) |
148 | { | 148 | { |
149 | 149 | ||
150 | foreach (Scene s in m_sceneList) | 150 | foreach (Scene s in m_sceneList) |
@@ -152,7 +152,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
152 | if (s.RegionInfo.RegionHandle == regionHandle) | 152 | if (s.RegionInfo.RegionHandle == regionHandle) |
153 | { | 153 | { |
154 | // m_log.DebugFormat("[LOCAL COMMS]: Found region {0} to send SendCreateChildAgent", regionHandle); | 154 | // m_log.DebugFormat("[LOCAL COMMS]: Found region {0} to send SendCreateChildAgent", regionHandle); |
155 | return s.NewUserConnection(aCircuit, out reason); | 155 | return s.NewUserConnection(aCircuit, teleportFlags, out reason); |
156 | } | 156 | } |
157 | } | 157 | } |
158 | 158 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs index 39e2413..0357c60 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs | |||
@@ -157,10 +157,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
157 | * Agent-related communications | 157 | * Agent-related communications |
158 | */ | 158 | */ |
159 | 159 | ||
160 | public bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, out string reason) | 160 | public bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, uint teleportFlags, out string reason) |
161 | { | 161 | { |
162 | // Try local first | 162 | // Try local first |
163 | if (m_localBackend.SendCreateChildAgent(regionHandle, aCircuit, out reason)) | 163 | if (m_localBackend.SendCreateChildAgent(regionHandle, aCircuit, teleportFlags, out reason)) |
164 | return true; | 164 | return true; |
165 | 165 | ||
166 | // else do the remote thing | 166 | // else do the remote thing |
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
173 | { | 173 | { |
174 | m_regionClient.SendUserInformation(regInfo, aCircuit); | 174 | m_regionClient.SendUserInformation(regInfo, aCircuit); |
175 | 175 | ||
176 | return m_regionClient.DoCreateChildAgentCall(regInfo, aCircuit, "None", out reason); | 176 | return m_regionClient.DoCreateChildAgentCall(regInfo, aCircuit, "None", teleportFlags, out reason); |
177 | } | 177 | } |
178 | //else | 178 | //else |
179 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | 179 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); |
@@ -435,11 +435,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
435 | } | 435 | } |
436 | 436 | ||
437 | OSDMap resp = new OSDMap(2); | 437 | OSDMap resp = new OSDMap(2); |
438 | string reason = String.Empty; | 438 | string reason = String.Empty; |
439 | 439 | uint teleportFlags = 0; | |
440 | if (args.ContainsKey("teleport_flags")) | ||
441 | { | ||
442 | teleportFlags = args["teleport_flags"].AsUInteger(); | ||
443 | } | ||
444 | |||
440 | // This is the meaning of POST agent | 445 | // This is the meaning of POST agent |
441 | m_regionClient.AdjustUserInformation(aCircuit); | 446 | m_regionClient.AdjustUserInformation(aCircuit); |
442 | bool result = m_localBackend.SendCreateChildAgent(regionhandle, aCircuit, out reason); | 447 | bool result = m_localBackend.SendCreateChildAgent(regionhandle, aCircuit, teleportFlags, out reason); |
443 | 448 | ||
444 | resp["reason"] = OSD.FromString(reason); | 449 | resp["reason"] = OSD.FromString(reason); |
445 | resp["success"] = OSD.FromBoolean(result); | 450 | resp["success"] = OSD.FromBoolean(result); |
diff --git a/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs b/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs index 8f4d3d5..2d6287f 100644 --- a/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs +++ b/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs | |||
@@ -37,7 +37,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
37 | { | 37 | { |
38 | #region Agents | 38 | #region Agents |
39 | 39 | ||
40 | bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, out string reason); | 40 | bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, uint teleportFlags, out string reason); |
41 | 41 | ||
42 | /// <summary> | 42 | /// <summary> |
43 | /// Full child agent update. | 43 | /// Full child agent update. |
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs index 0f9c190..416826c 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs | |||
@@ -203,7 +203,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid | |||
203 | string reason = String.Empty; | 203 | string reason = String.Empty; |
204 | 204 | ||
205 | //if (!m_commsProvider.InterRegion.InformRegionOfChildAgent(reg.RegionHandle, agentCircuit)) | 205 | //if (!m_commsProvider.InterRegion.InformRegionOfChildAgent(reg.RegionHandle, agentCircuit)) |
206 | if (!m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, agentCircuit, out reason)) | 206 | if (!m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, agentCircuit, teleportFlags, out reason)) |
207 | { | 207 | { |
208 | avatar.ControllingClient.SendTeleportFailed(String.Format("Destination is not accepting teleports: {0}", | 208 | avatar.ControllingClient.SendTeleportFailed(String.Format("Destination is not accepting teleports: {0}", |
209 | reason)); | 209 | reason)); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 37734f4..2091bf0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3343,12 +3343,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
3343 | /// Use NewUserConnection() directly if possible so the return type can refuse connections. | 3343 | /// Use NewUserConnection() directly if possible so the return type can refuse connections. |
3344 | /// At the moment nothing actually seems to use this event, | 3344 | /// At the moment nothing actually seems to use this event, |
3345 | /// as everything is switching to calling the NewUserConnection method directly. | 3345 | /// as everything is switching to calling the NewUserConnection method directly. |
3346 | /// | ||
3347 | /// Now obsoleting this because it doesn't handle teleportFlags propertly | ||
3348 | /// | ||
3346 | /// </summary> | 3349 | /// </summary> |
3347 | /// <param name="agent"></param> | 3350 | /// <param name="agent"></param> |
3351 | [Obsolete("Please call NewUserConnection directly.")] | ||
3348 | public void HandleNewUserConnection(AgentCircuitData agent) | 3352 | public void HandleNewUserConnection(AgentCircuitData agent) |
3349 | { | 3353 | { |
3350 | string reason; | 3354 | string reason; |
3351 | NewUserConnection(agent, out reason); | 3355 | NewUserConnection(agent, 0, out reason); |
3352 | } | 3356 | } |
3353 | 3357 | ||
3354 | /// <summary> | 3358 | /// <summary> |
@@ -3361,8 +3365,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
3361 | /// <param name="reason">Outputs the reason for the false response on this string</param> | 3365 | /// <param name="reason">Outputs the reason for the false response on this string</param> |
3362 | /// <returns>True if the region accepts this agent. False if it does not. False will | 3366 | /// <returns>True if the region accepts this agent. False if it does not. False will |
3363 | /// also return a reason.</returns> | 3367 | /// also return a reason.</returns> |
3364 | public bool NewUserConnection(AgentCircuitData agent, out string reason) | 3368 | public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason) |
3365 | { | 3369 | { |
3370 | //Teleport flags: | ||
3371 | // | ||
3372 | // TeleportFlags.ViaGodlikeLure - Border Crossing | ||
3373 | // TeleportFlags.ViaLogin - Login | ||
3374 | // TeleportFlags.TeleportFlags.ViaLure - Teleport request sent by another user | ||
3375 | // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport | ||
3376 | |||
3377 | |||
3366 | if (loginsdisabled) | 3378 | if (loginsdisabled) |
3367 | { | 3379 | { |
3368 | reason = "Logins Disabled"; | 3380 | reason = "Logins Disabled"; |
@@ -3370,9 +3382,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3370 | } | 3382 | } |
3371 | // Don't disable this log message - it's too helpful | 3383 | // Don't disable this log message - it's too helpful |
3372 | m_log.InfoFormat( | 3384 | m_log.InfoFormat( |
3373 | "[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5})", | 3385 | "[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, teleportflags {6})", |
3374 | RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, | 3386 | RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, |
3375 | agent.AgentID, agent.circuitcode); | 3387 | agent.AgentID, agent.circuitcode, teleportFlags); |
3376 | 3388 | ||
3377 | reason = String.Empty; | 3389 | reason = String.Empty; |
3378 | if (!AuthenticateUser(agent, out reason)) | 3390 | if (!AuthenticateUser(agent, out reason)) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 0a02d39..8c808ab 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
286 | string reason = String.Empty; | 286 | string reason = String.Empty; |
287 | 287 | ||
288 | 288 | ||
289 | bool regionAccepted = m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, a, out reason); | 289 | bool regionAccepted = m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, a, 0, out reason); |
290 | 290 | ||
291 | if (regionAccepted && newAgent) | 291 | if (regionAccepted && newAgent) |
292 | { | 292 | { |
@@ -835,7 +835,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
835 | 835 | ||
836 | // Let's create an agent there if one doesn't exist yet. | 836 | // Let's create an agent there if one doesn't exist yet. |
837 | //if (!m_commsProvider.InterRegion.InformRegionOfChildAgent(reg.RegionHandle, agentCircuit)) | 837 | //if (!m_commsProvider.InterRegion.InformRegionOfChildAgent(reg.RegionHandle, agentCircuit)) |
838 | if (!m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, agentCircuit, out reason)) | 838 | if (!m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, agentCircuit, teleportFlags, out reason)) |
839 | { | 839 | { |
840 | avatar.ControllingClient.SendTeleportFailed(String.Format("Destination is not accepting teleports: {0}", | 840 | avatar.ControllingClient.SendTeleportFailed(String.Format("Destination is not accepting teleports: {0}", |
841 | reason)); | 841 | reason)); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs index f495022..f00dd66 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs | |||
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
117 | agent.child = true; | 117 | agent.child = true; |
118 | 118 | ||
119 | string reason; | 119 | string reason; |
120 | scene.NewUserConnection(agent, out reason); | 120 | scene.NewUserConnection(agent, (uint)TeleportFlags.ViaLogin, out reason); |
121 | testclient = new TestClient(agent, scene); | 121 | testclient = new TestClient(agent, scene); |
122 | scene.AddNewClient(testclient); | 122 | scene.AddNewClient(testclient); |
123 | 123 | ||
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
153 | if (acd1 == null) | 153 | if (acd1 == null) |
154 | fixNullPresence(); | 154 | fixNullPresence(); |
155 | 155 | ||
156 | scene.NewUserConnection(acd1, out reason); | 156 | scene.NewUserConnection(acd1, 0, out reason); |
157 | if (testclient == null) | 157 | if (testclient == null) |
158 | testclient = new TestClient(acd1, scene); | 158 | testclient = new TestClient(acd1, scene); |
159 | scene.AddNewClient(testclient); | 159 | scene.AddNewClient(testclient); |
@@ -242,7 +242,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
242 | 242 | ||
243 | // Adding child agent to region 1001 | 243 | // Adding child agent to region 1001 |
244 | string reason; | 244 | string reason; |
245 | scene2.NewUserConnection(acd1, out reason); | 245 | scene2.NewUserConnection(acd1,0, out reason); |
246 | scene2.AddNewClient(testclient); | 246 | scene2.AddNewClient(testclient); |
247 | 247 | ||
248 | ScenePresence presence = scene.GetScenePresence(agent1); | 248 | ScenePresence presence = scene.GetScenePresence(agent1); |
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index 8b18d07..b13e8dd 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | |||
@@ -382,7 +382,7 @@ namespace OpenSim.Tests.Common.Setup | |||
382 | 382 | ||
383 | // We emulate the proper login sequence here by doing things in three stages | 383 | // We emulate the proper login sequence here by doing things in three stages |
384 | // Stage 1: simulate login by telling the scene to expect a new user connection | 384 | // Stage 1: simulate login by telling the scene to expect a new user connection |
385 | scene.NewUserConnection(agentData, out reason); | 385 | scene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason); |
386 | 386 | ||
387 | // Stage 2: add the new client as a child agent to the scene | 387 | // Stage 2: add the new client as a child agent to the scene |
388 | TestClient client = new TestClient(agentData, scene); | 388 | TestClient client = new TestClient(agentData, scene); |