diff options
author | Dr Scofield | 2009-05-05 16:17:52 +0000 |
---|---|---|
committer | Dr Scofield | 2009-05-05 16:17:52 +0000 |
commit | e0a06f641668cd5c25a7854af2faf8a61c4053ee (patch) | |
tree | c2a4620c4bdc0e479ca16528cd9e0524529a7998 /OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs | |
parent | * Fix http://opensimulator.org/mantis/view.php?id=3585 (diff) | |
download | opensim-SC_OLD-e0a06f641668cd5c25a7854af2faf8a61c4053ee.zip opensim-SC_OLD-e0a06f641668cd5c25a7854af2faf8a61c4053ee.tar.gz opensim-SC_OLD-e0a06f641668cd5c25a7854af2faf8a61c4053ee.tar.bz2 opensim-SC_OLD-e0a06f641668cd5c25a7854af2faf8a61c4053ee.tar.xz |
- moving banned check and public/private check to
Scene.NewUserConnection()
- adding reason reporting
this enforces estate bans very early on and prevents us from
circulating client objects that we'd then have to retract once we
realize that the client is not allowed into the region
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs index 7fafb6e..80dced7 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs | |||
@@ -140,10 +140,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Interregion | |||
140 | * Agent-related communications | 140 | * Agent-related communications |
141 | */ | 141 | */ |
142 | 142 | ||
143 | public bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit) | 143 | public bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, out string reason) |
144 | { | 144 | { |
145 | // Try local first | 145 | // Try local first |
146 | if (m_localBackend.SendCreateChildAgent(regionHandle, aCircuit)) | 146 | if (m_localBackend.SendCreateChildAgent(regionHandle, aCircuit, out reason)) |
147 | return true; | 147 | return true; |
148 | 148 | ||
149 | // else do the remote thing | 149 | // else do the remote thing |
@@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Interregion | |||
154 | { | 154 | { |
155 | m_regionClient.SendUserInformation(regInfo, aCircuit); | 155 | m_regionClient.SendUserInformation(regInfo, aCircuit); |
156 | 156 | ||
157 | return m_regionClient.DoCreateChildAgentCall(regInfo, aCircuit, "None"); | 157 | return m_regionClient.DoCreateChildAgentCall(regInfo, aCircuit, "None", out reason); |
158 | } | 158 | } |
159 | //else | 159 | //else |
160 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | 160 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); |
@@ -431,12 +431,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Interregion | |||
431 | return; | 431 | return; |
432 | } | 432 | } |
433 | 433 | ||
434 | OSDMap resp = new OSDMap(2); | ||
435 | string reason = String.Empty; | ||
436 | |||
434 | // This is the meaning of POST agent | 437 | // This is the meaning of POST agent |
435 | m_regionClient.AdjustUserInformation(aCircuit); | 438 | m_regionClient.AdjustUserInformation(aCircuit); |
436 | bool result = m_localBackend.SendCreateChildAgent(regionhandle, aCircuit); | 439 | bool result = m_localBackend.SendCreateChildAgent(regionhandle, aCircuit, out reason); |
440 | |||
441 | resp["reason"] = OSD.FromString(reason); | ||
442 | resp["success"] = OSD.FromBoolean(result); | ||
437 | 443 | ||
444 | // TODO: add reason if not String.Empty? | ||
438 | responsedata["int_response_code"] = 200; | 445 | responsedata["int_response_code"] = 200; |
439 | responsedata["str_response_string"] = result.ToString(); | 446 | responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp); |
440 | } | 447 | } |
441 | 448 | ||
442 | protected virtual void DoAgentPut(Hashtable request, Hashtable responsedata) | 449 | protected virtual void DoAgentPut(Hashtable request, Hashtable responsedata) |