aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectors/Interregion/LocalInterregionComms.cs7
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectors/Interregion/RESTInterregionComms.cs17
4 files changed, 27 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs
index f21ce0f..a5101d0 100644
--- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs
+++ b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs
@@ -160,8 +160,9 @@ namespace OpenSim.Region.CoreModules.Hypergrid
160 } 160 }
161 } 161 }
162 162
163 public bool NewUserConnection(ulong regionHandle, AgentCircuitData agent) 163 public bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason)
164 { 164 {
165 reason = String.Empty;
165 return true; 166 return true;
166 } 167 }
167 168
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
index ad91d63..5278b74 100644
--- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
@@ -545,7 +545,15 @@ namespace OpenSim.Region.CoreModules.InterGrid
545 homeScene.CommsManager.UserProfileCacheService.PreloadUserCache(userProfile); 545 homeScene.CommsManager.UserProfileCacheService.PreloadUserCache(userProfile);
546 546
547 // Call 'new user' event handler 547 // Call 'new user' event handler
548 homeScene.NewUserConnection(agentData); 548 string reason;
549 if (!homeScene.NewUserConnection(agentData, out reason))
550 {
551 responseMap["connect"] = OSD.FromBoolean(false);
552 responseMap["message"] = OSD.FromString(String.Format("Connection refused: {0}", reason));
553 m_log.ErrorFormat("[OGP]: rez_avatar/request failed: {0}", reason);
554 return responseMap;
555 }
556
549 557
550 //string raCap = string.Empty; 558 //string raCap = string.Empty;
551 559
diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/LocalInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/LocalInterregionComms.cs
index b94efa7..bdf2280 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/LocalInterregionComms.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectors/Interregion/LocalInterregionComms.cs
@@ -24,6 +24,7 @@
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27using System;
27using System.Collections.Generic; 28using System.Collections.Generic;
28using System.Reflection; 29using System.Reflection;
29using log4net; 30using log4net;
@@ -112,19 +113,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Interregion
112 * Agent-related communications 113 * Agent-related communications
113 */ 114 */
114 115
115 public bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit) 116 public bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, out string reason)
116 { 117 {
117 foreach (Scene s in m_sceneList) 118 foreach (Scene s in m_sceneList)
118 { 119 {
119 if (s.RegionInfo.RegionHandle == regionHandle) 120 if (s.RegionInfo.RegionHandle == regionHandle)
120 { 121 {
121// m_log.DebugFormat("[LOCAL COMMS]: Found region {0} to send SendCreateChildAgent", regionHandle); 122// m_log.DebugFormat("[LOCAL COMMS]: Found region {0} to send SendCreateChildAgent", regionHandle);
122 s.NewUserConnection(aCircuit); 123 return s.NewUserConnection(aCircuit, out reason);
123 return true;
124 } 124 }
125 } 125 }
126 126
127// m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for SendCreateChildAgent", regionHandle); 127// m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for SendCreateChildAgent", regionHandle);
128 reason = "Did not find region.";
128 return false; 129 return false;
129 } 130 }
130 131
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)