diff options
author | Charles Krinke | 2008-08-23 18:40:07 +0000 |
---|---|---|
committer | Charles Krinke | 2008-08-23 18:40:07 +0000 |
commit | 4c40a680fac28255fd51c4cef62d48caab8bd4db (patch) | |
tree | d74276b73f4f0b875aed6749a233c849ed74eed9 | |
parent | Change to no longer check funds on temp texture uploads. (diff) | |
download | opensim-SC-4c40a680fac28255fd51c4cef62d48caab8bd4db.zip opensim-SC-4c40a680fac28255fd51c4cef62d48caab8bd4db.tar.gz opensim-SC-4c40a680fac28255fd51c4cef62d48caab8bd4db.tar.bz2 opensim-SC-4c40a680fac28255fd51c4cef62d48caab8bd4db.tar.xz |
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)
-rw-r--r-- | OpenSim/Framework/Communications/UserManagerBase.cs | 8 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 1 |
2 files changed, 9 insertions, 0 deletions
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 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Net; | ||
31 | using System.Reflection; | 32 | using System.Reflection; |
32 | using System.Security.Cryptography; | 33 | using System.Security.Cryptography; |
33 | using libsecondlife; | 34 | using libsecondlife; |
@@ -362,6 +363,13 @@ namespace OpenSim.Framework.Communications | |||
362 | // User connection | 363 | // User connection |
363 | agent.AgentOnline = true; | 364 | agent.AgentOnline = true; |
364 | 365 | ||
366 | if (request.Params.Count > 1) | ||
367 | { | ||
368 | IPEndPoint RemoteIPEndPoint = (IPEndPoint)request.Params[1]; | ||
369 | agent.AgentIP = RemoteIPEndPoint.Address.ToString(); | ||
370 | agent.AgentPort = (uint)RemoteIPEndPoint.Port; | ||
371 | } | ||
372 | |||
365 | // Generate sessions | 373 | // Generate sessions |
366 | RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); | 374 | RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); |
367 | byte[] randDataS = new byte[16]; | 375 | 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 | |||
380 | string methodName = xmlRprcRequest.MethodName; | 380 | string methodName = xmlRprcRequest.MethodName; |
381 | if (methodName != null) | 381 | if (methodName != null) |
382 | { | 382 | { |
383 | xmlRprcRequest.Params.Add(request.RemoteIPEndPoint); | ||
383 | XmlRpcResponse xmlRpcResponse; | 384 | XmlRpcResponse xmlRpcResponse; |
384 | 385 | ||
385 | XmlRpcMethod method; | 386 | XmlRpcMethod method; |