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)
0.6.0-stable
Charles Krinke 2008-08-23 18:40:07 +00:00
parent bfc911f814
commit 4c40a680fa
2 changed files with 9 additions and 0 deletions

View File

@ -28,6 +28,7 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net;
using System.Reflection; using System.Reflection;
using System.Security.Cryptography; using System.Security.Cryptography;
using libsecondlife; using libsecondlife;
@ -362,6 +363,13 @@ namespace OpenSim.Framework.Communications
// User connection // User connection
agent.AgentOnline = true; 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 // Generate sessions
RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
byte[] randDataS = new byte[16]; byte[] randDataS = new byte[16];

View File

@ -380,6 +380,7 @@ namespace OpenSim.Framework.Servers
string methodName = xmlRprcRequest.MethodName; string methodName = xmlRprcRequest.MethodName;
if (methodName != null) if (methodName != null)
{ {
xmlRprcRequest.Params.Add(request.RemoteIPEndPoint);
XmlRpcResponse xmlRpcResponse; XmlRpcResponse xmlRpcResponse;
XmlRpcMethod method; XmlRpcMethod method;