From 4c40a680fac28255fd51c4cef62d48caab8bd4db Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sat, 23 Aug 2008 18:40:07 +0000 Subject: Mantis#2032. Thank you kindly, Tyre for a patch that: This small patch provides the required changes to populate the columns agentIP and agentPort in table "agents" Tested with mysql (but should work for all supported db engines) --- OpenSim/Framework/Communications/UserManagerBase.cs | 8 ++++++++ OpenSim/Framework/Servers/BaseHttpServer.cs | 1 + 2 files changed, 9 insertions(+) diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index ef900ea..fd02382 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -28,6 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Net; using System.Reflection; using System.Security.Cryptography; using libsecondlife; @@ -362,6 +363,13 @@ namespace OpenSim.Framework.Communications // User connection agent.AgentOnline = true; + if (request.Params.Count > 1) + { + IPEndPoint RemoteIPEndPoint = (IPEndPoint)request.Params[1]; + agent.AgentIP = RemoteIPEndPoint.Address.ToString(); + agent.AgentPort = (uint)RemoteIPEndPoint.Port; + } + // Generate sessions RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); byte[] randDataS = new byte[16]; diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index c3bd085..23c28e6 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -380,6 +380,7 @@ namespace OpenSim.Framework.Servers string methodName = xmlRprcRequest.MethodName; if (methodName != null) { + xmlRprcRequest.Params.Add(request.RemoteIPEndPoint); XmlRpcResponse xmlRpcResponse; XmlRpcMethod method; -- cgit v1.1