diff options
author | UbitUmarov | 2016-11-21 01:16:35 +0000 |
---|---|---|
committer | UbitUmarov | 2016-11-21 01:16:35 +0000 |
commit | b2c553b459a8390aaadd8f7c65567b1e557226c2 (patch) | |
tree | 15bf5416658a081a283d7c358e3d9471b4eda044 /OpenSim/Region/ClientStack/Linden | |
parent | handle HG lm tp to large regions in another way (diff) | |
download | opensim-SC_OLD-b2c553b459a8390aaadd8f7c65567b1e557226c2.zip opensim-SC_OLD-b2c553b459a8390aaadd8f7c65567b1e557226c2.tar.gz opensim-SC_OLD-b2c553b459a8390aaadd8f7c65567b1e557226c2.tar.bz2 opensim-SC_OLD-b2c553b459a8390aaadd8f7c65567b1e557226c2.tar.xz |
work around some warnings
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
4 files changed, 21 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index dc8ac3c..9449ffb 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | |||
@@ -111,6 +111,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
111 | /// hooked to put more data on the empty queue</summary> | 111 | /// hooked to put more data on the empty queue</summary> |
112 | public event QueueEmpty OnQueueEmpty; | 112 | public event QueueEmpty OnQueueEmpty; |
113 | 113 | ||
114 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design","CA1009:DeclareEventHandlersCorrectly")] | ||
114 | public event Func<ThrottleOutPacketTypeFlags, bool> HasUpdates; | 115 | public event Func<ThrottleOutPacketTypeFlags, bool> HasUpdates; |
115 | 116 | ||
116 | /// <summary>AgentID for this client</summary> | 117 | /// <summary>AgentID for this client</summary> |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index af33d17..a868e3a 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -521,7 +521,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
521 | 521 | ||
522 | // if (usePools) | 522 | // if (usePools) |
523 | // EnablePools(); | 523 | // EnablePools(); |
524 | DisablePools(); | 524 | base.DisablePools(); |
525 | } | 525 | } |
526 | 526 | ||
527 | public void Start() | 527 | public void Start() |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index 7171974..4d726b4 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | |||
@@ -179,6 +179,11 @@ namespace OpenMetaverse | |||
179 | // m_dropRandomGenerator = new Random(); | 179 | // m_dropRandomGenerator = new Random(); |
180 | } | 180 | } |
181 | 181 | ||
182 | ~OpenSimUDPBase() | ||
183 | { | ||
184 | if(m_udpSocket !=null) | ||
185 | try { m_udpSocket.Close(); } catch { } | ||
186 | } | ||
182 | /// <summary> | 187 | /// <summary> |
183 | /// Start inbound UDP packet handling. | 188 | /// Start inbound UDP packet handling. |
184 | /// </summary> | 189 | /// </summary> |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs index d4603f8..cac57b2 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs | |||
@@ -97,7 +97,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
97 | /// </summary> | 97 | /// </summary> |
98 | protected float m_burst; | 98 | protected float m_burst; |
99 | 99 | ||
100 | public virtual float MaxDripRate { get; set; } | 100 | protected float m_maxDripRate = 0; |
101 | public virtual float MaxDripRate | ||
102 | { | ||
103 | get { return m_maxDripRate; } | ||
104 | set { m_maxDripRate = value; } | ||
105 | } | ||
101 | 106 | ||
102 | public float RequestedBurst | 107 | public float RequestedBurst |
103 | { | 108 | { |
@@ -134,7 +139,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
134 | /// the system tick interval (typically around 15-22ms)</remarks> | 139 | /// the system tick interval (typically around 15-22ms)</remarks> |
135 | protected float m_dripRate; | 140 | protected float m_dripRate; |
136 | 141 | ||
137 | public virtual float RequestedDripRate | 142 | public float RequestedDripRate |
138 | { | 143 | { |
139 | get { return (m_dripRate == 0 ? m_totalDripRequest : m_dripRate); } | 144 | get { return (m_dripRate == 0 ? m_totalDripRequest : m_dripRate); } |
140 | set { | 145 | set { |
@@ -146,7 +151,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
146 | } | 151 | } |
147 | } | 152 | } |
148 | 153 | ||
149 | public virtual float DripRate | 154 | public float DripRate |
150 | { | 155 | { |
151 | get { | 156 | get { |
152 | float rate = Math.Min(RequestedDripRate,TotalDripRequest); | 157 | float rate = Math.Min(RequestedDripRate,TotalDripRequest); |
@@ -344,7 +349,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
344 | // greater than this. | 349 | // greater than this. |
345 | // </summary> | 350 | // </summary> |
346 | 351 | ||
347 | protected float m_maxDripRate = 0; | ||
348 | public override float MaxDripRate | 352 | public override float MaxDripRate |
349 | { | 353 | { |
350 | get { return (m_maxDripRate == 0 ? m_totalDripRequest : m_maxDripRate); } | 354 | get { return (m_maxDripRate == 0 ? m_totalDripRequest : m_maxDripRate); } |
@@ -359,7 +363,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
359 | // <summary> | 363 | // <summary> |
360 | // Adjust drip rate in response to network conditions. | 364 | // Adjust drip rate in response to network conditions. |
361 | // </summary> | 365 | // </summary> |
362 | public virtual float AdjustedDripRate | 366 | public float AdjustedDripRate |
363 | { | 367 | { |
364 | get { return m_dripRate; } | 368 | get { return m_dripRate; } |
365 | set | 369 | set |
@@ -380,12 +384,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
380 | { | 384 | { |
381 | m_enabled = enabled; | 385 | m_enabled = enabled; |
382 | 386 | ||
383 | MaxDripRate = maxDripRate; | 387 | m_maxDripRate = (maxDripRate == 0 ? m_totalDripRequest : Math.Max(maxDripRate, m_minimumFlow)); |
384 | 388 | ||
385 | if (enabled) | 389 | if (enabled) |
386 | AdjustedDripRate = m_maxDripRate * .5f; | 390 | m_dripRate = m_maxDripRate * .5f; |
387 | else | 391 | else |
388 | AdjustedDripRate = m_maxDripRate; | 392 | m_dripRate = m_maxDripRate; |
393 | if (m_parent != null) | ||
394 | m_parent.RegisterRequest(this, m_dripRate); | ||
389 | } | 395 | } |
390 | 396 | ||
391 | /// <summary> | 397 | /// <summary> |