* Use nini to pass config information to the client stack, rather than the ClientStackUserSettings class

* This conforms better to other module usage
This commit is contained in:
Justin Clarke Casey
2008-11-03 18:33:35 +00:00
parent add42f5e9b
commit 8c71954e08
10 changed files with 43 additions and 29 deletions

View File

@@ -1961,7 +1961,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
{
m_activeGroupID = activegroupid;
m_activeGroupName = groupname;
m_activeGroupPowers = grouppowers;

View File

@@ -322,6 +322,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length);
ResendThrottle.AddBytes(qpack.Packet.ToBytes().Length);
}
if (LandThrottle.UnderLimit() && LandOutgoingPacketQueue.Count > 0)
{
LLQueItem qpack = LandOutgoingPacketQueue.Dequeue();
@@ -330,6 +331,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length);
LandThrottle.AddBytes(qpack.Packet.ToBytes().Length);
}
if (WindThrottle.UnderLimit() && WindOutgoingPacketQueue.Count > 0)
{
LLQueItem qpack = WindOutgoingPacketQueue.Dequeue();
@@ -338,6 +340,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length);
WindThrottle.AddBytes(qpack.Packet.ToBytes().Length);
}
if (CloudThrottle.UnderLimit() && CloudOutgoingPacketQueue.Count > 0)
{
LLQueItem qpack = CloudOutgoingPacketQueue.Dequeue();
@@ -346,6 +349,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length);
CloudThrottle.AddBytes(qpack.Packet.ToBytes().Length);
}
if (TaskThrottle.UnderLimit() && (TaskOutgoingPacketQueue.Count > 0 || TaskLowpriorityPacketQueue.Count > 0))
{
LLQueItem qpack;
@@ -362,6 +366,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length);
TaskThrottle.AddBytes(qpack.Packet.ToBytes().Length);
}
if (TextureThrottle.UnderLimit() && TextureOutgoingPacketQueue.Count > 0)
{
LLQueItem qpack = TextureOutgoingPacketQueue.Dequeue();
@@ -370,6 +375,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length);
TextureThrottle.AddBytes(qpack.Packet.ToBytes().Length);
}
if (AssetThrottle.UnderLimit() && AssetOutgoingPacketQueue.Count > 0)
{
LLQueItem qpack = AssetOutgoingPacketQueue.Dequeue();

View File

@@ -33,6 +33,7 @@ using System.Net.Sockets;
using System.Reflection;
using OpenMetaverse.Packets;
using log4net;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.Environment.Scenes;
@@ -127,10 +128,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
public LLUDPServer(
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, ClientStackUserSettings userSettings,
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource,
AssetCache assetCache, AgentCircuitManager authenticateClass)
{
Initialise(_listenIP, ref port, proxyPortOffset, allow_alternate_port, userSettings, assetCache, authenticateClass);
Initialise(_listenIP, ref port, proxyPortOffset, allow_alternate_port, configSource, assetCache, authenticateClass);
}
/// <summary>
@@ -140,13 +141,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="port"></param>
/// <param name="proxyPortOffsetParm"></param>
/// <param name="allow_alternate_port"></param>
/// <param name="userSettings"></param>
/// <param name="configSource"></param>
/// <param name="assetCache"></param>
/// <param name="circuitManager"></param>
public void Initialise(
IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, ClientStackUserSettings userSettings,
IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource,
AssetCache assetCache, AgentCircuitManager circuitManager)
{
// XXX Temporary until we start unpacking the config source
// TODO: Don't forget to account for the null possibility
ClientStackUserSettings userSettings = new ClientStackUserSettings();
proxyPortOffset = proxyPortOffsetParm;
listenPort = (uint) (port + proxyPortOffsetParm);
listenIP = _listenIP;

View File

@@ -27,6 +27,7 @@
using System.Net;
using log4net;
using Nini.Config;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using OpenMetaverse;
@@ -68,12 +69,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer,
out AgentCircuitManager acm)
{
IConfigSource configSource = new IniConfigSource();
ClientStackUserSettings userSettings = new ClientStackUserSettings();
testLLUDPServer = new TestLLUDPServer();
acm = new AgentCircuitManager();
uint port = 666;
testLLUDPServer.Initialise(null, ref port, 0, false, userSettings, null, acm);
testLLUDPServer.Initialise(null, ref port, 0, false, configSource, null, acm);
testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings);
testLLUDPServer.LocalScene = scene;
}