diff options
author | Adam Frisby | 2009-05-23 06:05:20 +0000 |
---|---|---|
committer | Adam Frisby | 2009-05-23 06:05:20 +0000 |
commit | 31baeef469d72a9dc13cf4f56392b9f740f71cba (patch) | |
tree | ac50806ced72c5b296645bf061a3d9176a41075c /OpenSim/Framework/Communications/Tests | |
parent | * Breaks OpenSim.. err I mean.. adds NAT translation support to EnableSimulat... (diff) | |
download | opensim-SC_OLD-31baeef469d72a9dc13cf4f56392b9f740f71cba.zip opensim-SC_OLD-31baeef469d72a9dc13cf4f56392b9f740f71cba.tar.gz opensim-SC_OLD-31baeef469d72a9dc13cf4f56392b9f740f71cba.tar.bz2 opensim-SC_OLD-31baeef469d72a9dc13cf4f56392b9f740f71cba.tar.xz |
* Pipes requestors IP address through all XmlRpcRequest delegates. This is needed to be able to 'NAT-wrap' the login sequence.
* If you have something using XmlRpc that isn't in core, change your method signature from:
(XmlRpcRequest request)
to:
(XmlRpcRequest request, IPEndPoint remoteClient)
Diffstat (limited to 'OpenSim/Framework/Communications/Tests')
-rw-r--r-- | OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index 7d75faa..a2a388e 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | |||
@@ -103,7 +103,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
103 | 103 | ||
104 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); | 104 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); |
105 | 105 | ||
106 | XmlRpcResponse response = loginService.XmlRpcLoginMethod(request); | 106 | XmlRpcResponse response = loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); |
107 | Hashtable responseData = (Hashtable)response.Value; | 107 | Hashtable responseData = (Hashtable)response.Value; |
108 | 108 | ||
109 | Assert.That(responseData["first_name"], Is.EqualTo(m_firstName)); | 109 | Assert.That(responseData["first_name"], Is.EqualTo(m_firstName)); |
@@ -140,7 +140,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
140 | 140 | ||
141 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); | 141 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); |
142 | 142 | ||
143 | XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request); | 143 | XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); |
144 | Hashtable responseData = (Hashtable)response.Value; | 144 | Hashtable responseData = (Hashtable)response.Value; |
145 | 145 | ||
146 | UserAgentData uagent = m_userProfileData.CurrentAgent; | 146 | UserAgentData uagent = m_userProfileData.CurrentAgent; |
@@ -194,7 +194,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
194 | 194 | ||
195 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); | 195 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); |
196 | 196 | ||
197 | XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request); | 197 | XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); |
198 | Hashtable responseData = (Hashtable)response.Value; | 198 | Hashtable responseData = (Hashtable)response.Value; |
199 | 199 | ||
200 | ArrayList friendslist = (ArrayList) responseData["buddy-list"]; | 200 | ArrayList friendslist = (ArrayList) responseData["buddy-list"]; |
@@ -231,7 +231,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
231 | 231 | ||
232 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); | 232 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); |
233 | 233 | ||
234 | XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request); | 234 | XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); |
235 | Hashtable responseData = (Hashtable)response.Value; | 235 | Hashtable responseData = (Hashtable)response.Value; |
236 | Assert.That(responseData["message"], Is.EqualTo(error_auth_message)); | 236 | Assert.That(responseData["message"], Is.EqualTo(error_auth_message)); |
237 | 237 | ||
@@ -256,7 +256,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
256 | 256 | ||
257 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); | 257 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); |
258 | 258 | ||
259 | XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request); | 259 | XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); |
260 | Hashtable responseData = (Hashtable)response.Value; | 260 | Hashtable responseData = (Hashtable)response.Value; |
261 | Assert.That(responseData["message"], Is.EqualTo(error_auth_message)); | 261 | Assert.That(responseData["message"], Is.EqualTo(error_auth_message)); |
262 | 262 | ||
@@ -281,7 +281,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
281 | 281 | ||
282 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); | 282 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); |
283 | 283 | ||
284 | XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request); | 284 | XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); |
285 | Hashtable responseData = (Hashtable)response.Value; | 285 | Hashtable responseData = (Hashtable)response.Value; |
286 | Assert.That(responseData["message"], Is.EqualTo(error_xml_message)); | 286 | Assert.That(responseData["message"], Is.EqualTo(error_xml_message)); |
287 | 287 | ||
@@ -312,20 +312,20 @@ namespace OpenSim.Framework.Communications.Tests | |||
312 | 312 | ||
313 | // First we log in. | 313 | // First we log in. |
314 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); | 314 | XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); |
315 | XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request); | 315 | XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); |
316 | Hashtable responseData = (Hashtable)response.Value; | 316 | Hashtable responseData = (Hashtable)response.Value; |
317 | Assert.That(responseData["message"], Is.EqualTo("Hello folks")); | 317 | Assert.That(responseData["message"], Is.EqualTo("Hello folks")); |
318 | 318 | ||
319 | // Then we try again, this time expecting failure. | 319 | // Then we try again, this time expecting failure. |
320 | request = new XmlRpcRequest("login_to_simulator", sendParams); | 320 | request = new XmlRpcRequest("login_to_simulator", sendParams); |
321 | response = m_loginService.XmlRpcLoginMethod(request); | 321 | response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); |
322 | responseData = (Hashtable)response.Value; | 322 | responseData = (Hashtable)response.Value; |
323 | Assert.That(responseData["message"], Is.EqualTo(error_already_logged)); | 323 | Assert.That(responseData["message"], Is.EqualTo(error_already_logged)); |
324 | 324 | ||
325 | // Finally the third time we should be able to get right back in. | 325 | // Finally the third time we should be able to get right back in. |
326 | request = new XmlRpcRequest("login_to_simulator", sendParams); | 326 | request = new XmlRpcRequest("login_to_simulator", sendParams); |
327 | 327 | ||
328 | response = m_loginService.XmlRpcLoginMethod(request); | 328 | response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); |
329 | responseData = (Hashtable)response.Value; | 329 | responseData = (Hashtable)response.Value; |
330 | Assert.That(responseData["message"], Is.EqualTo("Hello folks")); | 330 | Assert.That(responseData["message"], Is.EqualTo("Hello folks")); |
331 | 331 | ||