aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-03 18:33:35 +0000
committerJustin Clarke Casey2008-11-03 18:33:35 +0000
commit8c71954e0892958da444ef5c82173262daa3f46c (patch)
tree6e06070ae11dbfd6a84b1ae7995e6df6275f892e /OpenSim/Region/ClientStack/LindenUDP
parentcompleting move to refactored multi-channel capable IRCBridgeModule (diff)
downloadopensim-SC_OLD-8c71954e0892958da444ef5c82173262daa3f46c.zip
opensim-SC_OLD-8c71954e0892958da444ef5c82173262daa3f46c.tar.gz
opensim-SC_OLD-8c71954e0892958da444ef5c82173262daa3f46c.tar.bz2
opensim-SC_OLD-8c71954e0892958da444ef5c82173262daa3f46c.tar.xz
* Use nini to pass config information to the client stack, rather than the ClientStackUserSettings class
* This conforms better to other module usage
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs1
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs6
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs13
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs4
4 files changed, 18 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index d272667..dee5d80 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -1961,7 +1961,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1961 1961
1962 public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) 1962 public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
1963 { 1963 {
1964
1965 m_activeGroupID = activegroupid; 1964 m_activeGroupID = activegroupid;
1966 m_activeGroupName = groupname; 1965 m_activeGroupName = groupname;
1967 m_activeGroupPowers = grouppowers; 1966 m_activeGroupPowers = grouppowers;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
index bf95045..9abde5d 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
@@ -322,6 +322,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
322 TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length); 322 TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length);
323 ResendThrottle.AddBytes(qpack.Packet.ToBytes().Length); 323 ResendThrottle.AddBytes(qpack.Packet.ToBytes().Length);
324 } 324 }
325
325 if (LandThrottle.UnderLimit() && LandOutgoingPacketQueue.Count > 0) 326 if (LandThrottle.UnderLimit() && LandOutgoingPacketQueue.Count > 0)
326 { 327 {
327 LLQueItem qpack = LandOutgoingPacketQueue.Dequeue(); 328 LLQueItem qpack = LandOutgoingPacketQueue.Dequeue();
@@ -330,6 +331,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
330 TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length); 331 TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length);
331 LandThrottle.AddBytes(qpack.Packet.ToBytes().Length); 332 LandThrottle.AddBytes(qpack.Packet.ToBytes().Length);
332 } 333 }
334
333 if (WindThrottle.UnderLimit() && WindOutgoingPacketQueue.Count > 0) 335 if (WindThrottle.UnderLimit() && WindOutgoingPacketQueue.Count > 0)
334 { 336 {
335 LLQueItem qpack = WindOutgoingPacketQueue.Dequeue(); 337 LLQueItem qpack = WindOutgoingPacketQueue.Dequeue();
@@ -338,6 +340,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
338 TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length); 340 TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length);
339 WindThrottle.AddBytes(qpack.Packet.ToBytes().Length); 341 WindThrottle.AddBytes(qpack.Packet.ToBytes().Length);
340 } 342 }
343
341 if (CloudThrottle.UnderLimit() && CloudOutgoingPacketQueue.Count > 0) 344 if (CloudThrottle.UnderLimit() && CloudOutgoingPacketQueue.Count > 0)
342 { 345 {
343 LLQueItem qpack = CloudOutgoingPacketQueue.Dequeue(); 346 LLQueItem qpack = CloudOutgoingPacketQueue.Dequeue();
@@ -346,6 +349,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
346 TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length); 349 TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length);
347 CloudThrottle.AddBytes(qpack.Packet.ToBytes().Length); 350 CloudThrottle.AddBytes(qpack.Packet.ToBytes().Length);
348 } 351 }
352
349 if (TaskThrottle.UnderLimit() && (TaskOutgoingPacketQueue.Count > 0 || TaskLowpriorityPacketQueue.Count > 0)) 353 if (TaskThrottle.UnderLimit() && (TaskOutgoingPacketQueue.Count > 0 || TaskLowpriorityPacketQueue.Count > 0))
350 { 354 {
351 LLQueItem qpack; 355 LLQueItem qpack;
@@ -362,6 +366,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
362 TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length); 366 TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length);
363 TaskThrottle.AddBytes(qpack.Packet.ToBytes().Length); 367 TaskThrottle.AddBytes(qpack.Packet.ToBytes().Length);
364 } 368 }
369
365 if (TextureThrottle.UnderLimit() && TextureOutgoingPacketQueue.Count > 0) 370 if (TextureThrottle.UnderLimit() && TextureOutgoingPacketQueue.Count > 0)
366 { 371 {
367 LLQueItem qpack = TextureOutgoingPacketQueue.Dequeue(); 372 LLQueItem qpack = TextureOutgoingPacketQueue.Dequeue();
@@ -370,6 +375,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
370 TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length); 375 TotalThrottle.AddBytes(qpack.Packet.ToBytes().Length);
371 TextureThrottle.AddBytes(qpack.Packet.ToBytes().Length); 376 TextureThrottle.AddBytes(qpack.Packet.ToBytes().Length);
372 } 377 }
378
373 if (AssetThrottle.UnderLimit() && AssetOutgoingPacketQueue.Count > 0) 379 if (AssetThrottle.UnderLimit() && AssetOutgoingPacketQueue.Count > 0)
374 { 380 {
375 LLQueItem qpack = AssetOutgoingPacketQueue.Dequeue(); 381 LLQueItem qpack = AssetOutgoingPacketQueue.Dequeue();
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index ba4e18b..cbe6eff 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -33,6 +33,7 @@ using System.Net.Sockets;
33using System.Reflection; 33using System.Reflection;
34using OpenMetaverse.Packets; 34using OpenMetaverse.Packets;
35using log4net; 35using log4net;
36using Nini.Config;
36using OpenSim.Framework; 37using OpenSim.Framework;
37using OpenSim.Framework.Communications.Cache; 38using OpenSim.Framework.Communications.Cache;
38using OpenSim.Region.Environment.Scenes; 39using OpenSim.Region.Environment.Scenes;
@@ -127,10 +128,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
127 } 128 }
128 129
129 public LLUDPServer( 130 public LLUDPServer(
130 IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, ClientStackUserSettings userSettings, 131 IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource,
131 AssetCache assetCache, AgentCircuitManager authenticateClass) 132 AssetCache assetCache, AgentCircuitManager authenticateClass)
132 { 133 {
133 Initialise(_listenIP, ref port, proxyPortOffset, allow_alternate_port, userSettings, assetCache, authenticateClass); 134 Initialise(_listenIP, ref port, proxyPortOffset, allow_alternate_port, configSource, assetCache, authenticateClass);
134 } 135 }
135 136
136 /// <summary> 137 /// <summary>
@@ -140,13 +141,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
140 /// <param name="port"></param> 141 /// <param name="port"></param>
141 /// <param name="proxyPortOffsetParm"></param> 142 /// <param name="proxyPortOffsetParm"></param>
142 /// <param name="allow_alternate_port"></param> 143 /// <param name="allow_alternate_port"></param>
143 /// <param name="userSettings"></param> 144 /// <param name="configSource"></param>
144 /// <param name="assetCache"></param> 145 /// <param name="assetCache"></param>
145 /// <param name="circuitManager"></param> 146 /// <param name="circuitManager"></param>
146 public void Initialise( 147 public void Initialise(
147 IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, ClientStackUserSettings userSettings, 148 IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource,
148 AssetCache assetCache, AgentCircuitManager circuitManager) 149 AssetCache assetCache, AgentCircuitManager circuitManager)
149 { 150 {
151 // XXX Temporary until we start unpacking the config source
152 // TODO: Don't forget to account for the null possibility
153 ClientStackUserSettings userSettings = new ClientStackUserSettings();
154
150 proxyPortOffset = proxyPortOffsetParm; 155 proxyPortOffset = proxyPortOffsetParm;
151 listenPort = (uint) (port + proxyPortOffsetParm); 156 listenPort = (uint) (port + proxyPortOffsetParm);
152 listenIP = _listenIP; 157 listenIP = _listenIP;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs
index 352f697..d55f423 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs
@@ -27,6 +27,7 @@
27 27
28using System.Net; 28using System.Net;
29using log4net; 29using log4net;
30using Nini.Config;
30using NUnit.Framework; 31using NUnit.Framework;
31using NUnit.Framework.SyntaxHelpers; 32using NUnit.Framework.SyntaxHelpers;
32using OpenMetaverse; 33using OpenMetaverse;
@@ -68,12 +69,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
68 IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer, 69 IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer,
69 out AgentCircuitManager acm) 70 out AgentCircuitManager acm)
70 { 71 {
72 IConfigSource configSource = new IniConfigSource();
71 ClientStackUserSettings userSettings = new ClientStackUserSettings(); 73 ClientStackUserSettings userSettings = new ClientStackUserSettings();
72 testLLUDPServer = new TestLLUDPServer(); 74 testLLUDPServer = new TestLLUDPServer();
73 acm = new AgentCircuitManager(); 75 acm = new AgentCircuitManager();
74 76
75 uint port = 666; 77 uint port = 666;
76 testLLUDPServer.Initialise(null, ref port, 0, false, userSettings, null, acm); 78 testLLUDPServer.Initialise(null, ref port, 0, false, configSource, null, acm);
77 testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings); 79 testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings);
78 testLLUDPServer.LocalScene = scene; 80 testLLUDPServer.LocalScene = scene;
79 } 81 }