From 31baeef469d72a9dc13cf4f56392b9f740f71cba Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 23 May 2009 06:05:20 +0000 Subject: * 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) --- .../Communications/Tests/LoginServiceTests.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'OpenSim/Framework/Communications/Tests') 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 XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); - XmlRpcResponse response = loginService.XmlRpcLoginMethod(request); + XmlRpcResponse response = loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); Hashtable responseData = (Hashtable)response.Value; Assert.That(responseData["first_name"], Is.EqualTo(m_firstName)); @@ -140,7 +140,7 @@ namespace OpenSim.Framework.Communications.Tests XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); - XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request); + XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); Hashtable responseData = (Hashtable)response.Value; UserAgentData uagent = m_userProfileData.CurrentAgent; @@ -194,7 +194,7 @@ namespace OpenSim.Framework.Communications.Tests XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); - XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request); + XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); Hashtable responseData = (Hashtable)response.Value; ArrayList friendslist = (ArrayList) responseData["buddy-list"]; @@ -231,7 +231,7 @@ namespace OpenSim.Framework.Communications.Tests XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); - XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request); + XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); Hashtable responseData = (Hashtable)response.Value; Assert.That(responseData["message"], Is.EqualTo(error_auth_message)); @@ -256,7 +256,7 @@ namespace OpenSim.Framework.Communications.Tests XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); - XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request); + XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); Hashtable responseData = (Hashtable)response.Value; Assert.That(responseData["message"], Is.EqualTo(error_auth_message)); @@ -281,7 +281,7 @@ namespace OpenSim.Framework.Communications.Tests XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); - XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request); + XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); Hashtable responseData = (Hashtable)response.Value; Assert.That(responseData["message"], Is.EqualTo(error_xml_message)); @@ -312,20 +312,20 @@ namespace OpenSim.Framework.Communications.Tests // First we log in. XmlRpcRequest request = new XmlRpcRequest("login_to_simulator", sendParams); - XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request); + XmlRpcResponse response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); Hashtable responseData = (Hashtable)response.Value; Assert.That(responseData["message"], Is.EqualTo("Hello folks")); // Then we try again, this time expecting failure. request = new XmlRpcRequest("login_to_simulator", sendParams); - response = m_loginService.XmlRpcLoginMethod(request); + response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); responseData = (Hashtable)response.Value; Assert.That(responseData["message"], Is.EqualTo(error_already_logged)); // Finally the third time we should be able to get right back in. request = new XmlRpcRequest("login_to_simulator", sendParams); - response = m_loginService.XmlRpcLoginMethod(request); + response = m_loginService.XmlRpcLoginMethod(request, new IPEndPoint(Util.GetLocalHost(), 80)); responseData = (Hashtable)response.Value; Assert.That(responseData["message"], Is.EqualTo("Hello folks")); -- cgit v1.1