From 67555994adc6b5449a0a1c21997e7bfcf880ad02 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 5 Feb 2011 07:55:54 -0800
Subject: Amend to yesterday's deletions: forgot to delete the RemoteInventory
module in th addin.xml file.
---
OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml | 1 -
1 file changed, 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
index 43de2ab..a9d247a 100644
--- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
+++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
@@ -47,7 +47,6 @@
-
--
cgit v1.1
From 3a2a48a8cad9914862b6804cb46b21bc2c8d6bf7 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 5 Feb 2011 08:20:13 -0800
Subject: Add sane packing of ServiceURLs -- OSDMap. The old way (OSDArray) is
still supported for backwards compatibility, but will be removed in the
future.
---
OpenSim/Framework/AgentCircuitData.cs | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs
index 1600bdc..3dbc215 100644
--- a/OpenSim/Framework/AgentCircuitData.cs
+++ b/OpenSim/Framework/AgentCircuitData.cs
@@ -220,6 +220,8 @@ namespace OpenSim.Framework
args["packed_appearance"] = appmap;
}
+ // Old, bad way. Keeping it fow now for backwards compatibility
+ // OBSOLETE -- soon to be deleted
if (ServiceURLs != null && ServiceURLs.Count > 0)
{
OSDArray urls = new OSDArray(ServiceURLs.Count * 2);
@@ -232,6 +234,19 @@ namespace OpenSim.Framework
args["service_urls"] = urls;
}
+ // again, this time the right way
+ if (ServiceURLs != null && ServiceURLs.Count > 0)
+ {
+ OSDMap urls = new OSDMap();
+ foreach (KeyValuePair kvp in ServiceURLs)
+ {
+ //System.Console.WriteLine("XXX " + kvp.Key + "=" + kvp.Value);
+ urls[kvp.Key] = OSD.FromString((kvp.Value == null) ? string.Empty : kvp.Value.ToString());
+ }
+ args["serviceurls"] = urls;
+ }
+
+
return args;
}
@@ -327,7 +342,20 @@ namespace OpenSim.Framework
}
ServiceURLs = new Dictionary();
- if (args.ContainsKey("service_urls") && args["service_urls"] != null && (args["service_urls"]).Type == OSDType.Array)
+ // Try parse the new way, OSDMap
+ if (args.ContainsKey("serviceurls") && args["serviceurls"] != null && (args["serviceurls"]).Type == OSDType.Map)
+ {
+ OSDMap urls = (OSDMap)(args["serviceurls"]);
+ foreach (KeyValuePair kvp in urls)
+ {
+ ServiceURLs[kvp.Key] = kvp.Value.AsString();
+ //System.Console.WriteLine("XXX " + kvp.Key + "=" + ServiceURLs[kvp.Key]);
+
+ }
+ }
+ // else try the old way, OSDArray
+ // OBSOLETE -- soon to be deleted
+ else if (args.ContainsKey("service_urls") && args["service_urls"] != null && (args["service_urls"]).Type == OSDType.Array)
{
OSDArray urls = (OSDArray)(args["service_urls"]);
for (int i = 0; i < urls.Count / 2; i++)
--
cgit v1.1
From b20ab1063f5717a69fb3226c44b4af5228280d35 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 5 Feb 2011 17:57:30 -0800
Subject: Added a couple of console commands to help diagnose issues: show
circuits: shows the lists of agent circuit data show http-handlers: shows the
currently registered http handlers
---
.../Framework/Servers/HttpServer/BaseHttpServer.cs | 32 ++++++++++++++
OpenSim/Region/Application/OpenSim.cs | 50 ++++++++++++++++++++++
2 files changed, 82 insertions(+)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index d4ee7ba..4c35132 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -143,6 +143,11 @@ namespace OpenSim.Framework.Servers.HttpServer
}
}
+ public List GetStreamHandlerKeys()
+ {
+ return new List(m_streamHandlers.Keys);
+ }
+
private static string GetHandlerKey(string httpMethod, string path)
{
return httpMethod + ":" + path;
@@ -179,6 +184,11 @@ namespace OpenSim.Framework.Servers.HttpServer
}
}
+ public List GetXmlRpcHandlerKeys()
+ {
+ return new List(m_rpcHandlers.Keys);
+ }
+
public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler)
{
//m_log.DebugFormat("[BASE HTTP SERVER]: Registering {0}", methodName);
@@ -196,6 +206,12 @@ namespace OpenSim.Framework.Servers.HttpServer
return false;
}
+ public List GetHTTPHandlerKeys()
+ {
+ return new List(m_HTTPHandlers.Keys);
+ }
+
+
public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args)
{
bool pollHandlerResult = false;
@@ -214,6 +230,12 @@ namespace OpenSim.Framework.Servers.HttpServer
return false;
}
+ public List GetPollServiceHandlerKeys()
+ {
+ return new List(m_pollHandlers.Keys);
+ }
+
+
// Note that the agent string is provided simply to differentiate
// the handlers - it is NOT required to be an actual agent header
// value.
@@ -232,6 +254,11 @@ namespace OpenSim.Framework.Servers.HttpServer
return false;
}
+ public List GetAgentHandlerKeys()
+ {
+ return new List(m_agentHandlers.Keys);
+ }
+
public bool AddLLSDHandler(string path, LLSDMethod handler)
{
lock (m_llsdHandlers)
@@ -245,6 +272,11 @@ namespace OpenSim.Framework.Servers.HttpServer
return false;
}
+ public List GetLLSDHandlerKeys()
+ {
+ return new List(m_llsdHandlers.Keys);
+ }
+
public bool SetDefaultLLSDHandler(DefaultLLSDMethod handler)
{
m_defaultLlsdHandler = handler;
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index ed4b620..bbcc588 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -294,6 +294,14 @@ namespace OpenSim
"show connections",
"Show connection data", HandleShow);
+ m_console.Commands.AddCommand("region", false, "show circuits",
+ "show circuits",
+ "Show agent circuit data", HandleShow);
+
+ m_console.Commands.AddCommand("region", false, "show http-handlers",
+ "show http-handlers",
+ "Show all registered http handlers", HandleShow);
+
m_console.Commands.AddCommand("region", false, "show modules",
"show modules",
"Show module data", HandleShow);
@@ -943,6 +951,48 @@ namespace OpenSim
MainConsole.Instance.Output(connections.ToString());
break;
+ case "circuits":
+ System.Text.StringBuilder acd = new System.Text.StringBuilder("Agent Circuits:\n");
+ m_sceneManager.ForEachScene(
+ delegate(Scene scene)
+ {
+ //this.HttpServer.
+ acd.AppendFormat("{0}:\n", scene.RegionInfo.RegionName);
+ foreach (AgentCircuitData aCircuit in scene.AuthenticateHandler.AgentCircuits.Values)
+ acd.AppendFormat("\t{0} {1} ({2})\n", aCircuit.firstname, aCircuit.lastname, (aCircuit.child ? "Child" : "Root"));
+ }
+ );
+
+ MainConsole.Instance.Output(acd.ToString());
+ break;
+
+ case "http-handlers":
+ System.Text.StringBuilder handlers = new System.Text.StringBuilder("Registered HTTP Handlers:\n");
+
+ handlers.AppendFormat("* XMLRPC:\n");
+ foreach (String s in HttpServer.GetXmlRpcHandlerKeys())
+ handlers.AppendFormat("\t{0}\n", s);
+
+ handlers.AppendFormat("* HTTP:\n");
+ List poll = HttpServer.GetPollServiceHandlerKeys();
+ foreach (String s in HttpServer.GetHTTPHandlerKeys())
+ handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty));
+
+ handlers.AppendFormat("* Agent:\n");
+ foreach (String s in HttpServer.GetAgentHandlerKeys())
+ handlers.AppendFormat("\t{0}\n", s);
+
+ handlers.AppendFormat("* LLSD:\n");
+ foreach (String s in HttpServer.GetLLSDHandlerKeys())
+ handlers.AppendFormat("\t{0}\n", s);
+
+ handlers.AppendFormat("* StreamHandlers ({0}):\n", HttpServer.GetStreamHandlerKeys().Count);
+ foreach (String s in HttpServer.GetStreamHandlerKeys())
+ handlers.AppendFormat("\t{0}\n", s);
+
+ MainConsole.Instance.Output(handlers.ToString());
+ break;
+
case "modules":
MainConsole.Instance.Output("The currently loaded shared modules are:");
foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules)
--
cgit v1.1
From 30fa5ad1e29df50de99611b43adfd577696bfdda Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 5 Feb 2011 19:21:12 -0800
Subject: One more diagnosis command: show caps
---
.../Agent/Capabilities/CapabilitiesModule.cs | 28 +++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
index c023a6f..75df6cc 100644
--- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
@@ -26,12 +26,14 @@
*/
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
+using OpenSim.Framework.Console;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using Caps=OpenSim.Framework.Capabilities.Caps;
@@ -61,6 +63,10 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
{
m_scene = scene;
m_scene.RegisterModuleInterface(this);
+ MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps",
+ "show capabilities",
+ "Shows all registered capabilities", CapabilitiesCommand);
+ m_log.Error("\n\n**************************************************************\n\n");
}
public void RegionLoaded(Scene scene)
@@ -72,7 +78,9 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
m_scene.UnregisterModuleInterface(this);
}
- public void PostInitialise() {}
+ public void PostInitialise()
+ {
+ }
public void Close() {}
@@ -226,5 +234,23 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
m_log.Info(" >> "+x+", "+y+": "+kvp.Value);
}
}
+
+ private void CapabilitiesCommand(string module, string[] cmdparams)
+ {
+ System.Text.StringBuilder caps = new System.Text.StringBuilder();
+ caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName);
+
+ foreach (KeyValuePair kvp in m_capsHandlers)
+ {
+ caps.AppendFormat("** User {0}:\n", kvp.Key);
+ for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.CapsDetails.GetEnumerator(); kvp2.MoveNext(); )
+ {
+ Uri uri = new Uri(kvp2.Value.ToString());
+ caps.AppendFormat(" {0} = {1}\n", kvp2.Key, uri.PathAndQuery);
+ }
+ }
+
+ MainConsole.Instance.Output(caps.ToString());
+ }
}
}
--
cgit v1.1
From cc81d924cab97889538c20e9bfa45008ecfead3e Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 5 Feb 2011 19:34:02 -0800
Subject: Fixed Caps handlers leak
---
OpenSim/Framework/Capabilities/CapsHandlers.cs | 2 +-
OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/Capabilities/CapsHandlers.cs b/OpenSim/Framework/Capabilities/CapsHandlers.cs
index 864e6dd..e1c800e 100644
--- a/OpenSim/Framework/Capabilities/CapsHandlers.cs
+++ b/OpenSim/Framework/Capabilities/CapsHandlers.cs
@@ -88,8 +88,8 @@ namespace OpenSim.Framework.Capabilities
/// handler to be removed
public void Remove(string capsName)
{
- // This line must be here, or caps will break!
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path);
+ m_httpListener.RemoveStreamHandler("GET", m_capsHandlers[capsName].Path);
m_capsHandlers.Remove(capsName);
}
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
index 75df6cc..1d8e70e 100644
--- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
@@ -66,7 +66,6 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps",
"show capabilities",
"Shows all registered capabilities", CapabilitiesCommand);
- m_log.Error("\n\n**************************************************************\n\n");
}
public void RegionLoaded(Scene scene)
--
cgit v1.1
From 3411d4867d01d4cf87f09300f69d149c5269c611 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 5 Feb 2011 19:40:55 -0800
Subject: Honor check of m_Enabled in WorldViewModule.
---
OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs | 3 +++
1 file changed, 3 insertions(+)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs
index d4b7020..cee8851 100644
--- a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs
+++ b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs
@@ -71,6 +71,9 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
public void RegionLoaded(Scene scene)
{
+ if (!m_Enabled)
+ return;
+
m_Generator = scene.RequestModuleInterface();
if (m_Generator == null)
{
--
cgit v1.1
From 2c7e87c45bb0d543ba0ab9342a1bc29f92fb4fd3 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 6 Feb 2011 07:51:20 -0800
Subject: Better output for show neighbours
---
.../ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
index 023a44c..3c36799 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
@@ -247,13 +247,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
public void NeighboursCommand(string module, string[] cmdparams)
{
+ System.Text.StringBuilder caps = new System.Text.StringBuilder();
+
foreach (KeyValuePair kvp in m_LocalCache)
{
- m_log.InfoFormat("*** Neighbours of {0} {1} ***", kvp.Key, kvp.Value.RegionName);
+ caps.AppendFormat("*** Neighbours of {0} ({1}) ***\n", kvp.Value.RegionName, kvp.Key);
List regions = kvp.Value.GetNeighbours();
foreach (GridRegion r in regions)
- m_log.InfoFormat(" {0} @ {1}={2}", r.RegionName, r.RegionLocX / Constants.RegionSize, r.RegionLocY / Constants.RegionSize);
+ caps.AppendFormat(" {0} @ {1}-{2}\n", r.RegionName, r.RegionLocX / Constants.RegionSize, r.RegionLocY / Constants.RegionSize);
}
+
+ MainConsole.Instance.Output(caps.ToString());
}
}
--
cgit v1.1
From 98ea78fc77b3dd6da185d71dfab402a0ef8780d6 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 6 Feb 2011 19:39:29 -0800
Subject: New command: show pending-objects
---
OpenSim/Region/Application/OpenSim.cs | 22 ++++++++++++++++++++++
.../Region/Framework/Interfaces/ISceneViewer.cs | 1 +
OpenSim/Region/Framework/Scenes/SceneViewer.cs | 8 ++++++++
3 files changed, 31 insertions(+)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index bbcc588..bd1aa46 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -302,6 +302,10 @@ namespace OpenSim
"show http-handlers",
"Show all registered http handlers", HandleShow);
+ m_console.Commands.AddCommand("region", false, "show pending-objects",
+ "show pending-objects",
+ "Show # of objects on the pending queues of all scene viewers", HandleShow);
+
m_console.Commands.AddCommand("region", false, "show modules",
"show modules",
"Show module data", HandleShow);
@@ -993,6 +997,24 @@ namespace OpenSim
MainConsole.Instance.Output(handlers.ToString());
break;
+ case "pending-objects":
+ System.Text.StringBuilder pending = new System.Text.StringBuilder("Pending objects:\n");
+ m_sceneManager.ForEachScene(
+ delegate(Scene scene)
+ {
+ scene.ForEachScenePresence(
+ delegate(ScenePresence sp)
+ {
+ pending.AppendFormat("{0}: {1} {2} pending\n",
+ scene.RegionInfo.RegionName, sp.Name, sp.SceneViewer.GetPendingObjectsCount());
+ }
+ );
+ }
+ );
+
+ MainConsole.Instance.Output(pending.ToString());
+ break;
+
case "modules":
MainConsole.Instance.Output("The currently loaded shared modules are:");
foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules)
diff --git a/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs b/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs
index 7251d57..2397f22 100644
--- a/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs
@@ -36,5 +36,6 @@ namespace OpenSim.Region.Framework.Interfaces
void Close();
void QueuePartForUpdate(SceneObjectPart part);
void SendPrimUpdates();
+ int GetPendingObjectsCount();
}
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
index b44a010..7c067ca 100644
--- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
@@ -205,6 +205,14 @@ namespace OpenSim.Region.Framework.Scenes
Reset();
}
+ public int GetPendingObjectsCount()
+ {
+ if (m_pendingObjects != null)
+ return m_pendingObjects.Count;
+
+ return 0;
+ }
+
public class ScenePartUpdate
{
public UUID FullID;
--
cgit v1.1
From ebeef02fef1a04b5b4cfe13dad588bcce7f9ba21 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 7 Feb 2011 07:45:03 -0800
Subject: Hunting down mantis #5365 Revert "refactor: remove redundant null
checks"
This reverts commit 6e58996b4d9db202cd7795a37bd687362effef48.
---
.../LindenUDP/UnackedPacketCollection.cs | 45 ++++++++++++++--------
1 file changed, 30 insertions(+), 15 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
index 9d40688..d762bef 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
@@ -141,31 +141,46 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void ProcessQueues()
{
// Process all the pending adds
+
OutgoingPacket pendingAdd;
- while (m_pendingAdds.TryDequeue(out pendingAdd))
- m_packets[pendingAdd.SequenceNumber] = pendingAdd;
+ if (m_pendingAdds != null)
+ {
+ while (m_pendingAdds.TryDequeue(out pendingAdd))
+ {
+ if (pendingAdd != null && m_packets != null)
+ {
+ m_packets[pendingAdd.SequenceNumber] = pendingAdd;
+ }
+ }
+ }
// Process all the pending removes, including updating statistics and round-trip times
PendingAck pendingRemove;
OutgoingPacket ackedPacket;
- while (m_pendingRemoves.TryDequeue(out pendingRemove))
+ if (m_pendingRemoves != null)
{
- if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
+ while (m_pendingRemoves.TryDequeue(out pendingRemove))
{
- m_packets.Remove(pendingRemove.SequenceNumber);
-
- // Update stats
- Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
-
- if (!pendingRemove.FromResend)
+ if (m_pendingRemoves != null && m_packets != null)
{
- // Calculate the round-trip time for this packet and its ACK
- int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
- if (rtt > 0)
- ackedPacket.Client.UpdateRoundTrip(rtt);
+ if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
+ {
+ m_packets.Remove(pendingRemove.SequenceNumber);
+
+ // Update stats
+ Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
+
+ if (!pendingRemove.FromResend)
+ {
+ // Calculate the round-trip time for this packet and its ACK
+ int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
+ if (rtt > 0)
+ ackedPacket.Client.UpdateRoundTrip(rtt);
+ }
+ }
}
}
}
}
}
-}
\ No newline at end of file
+}
--
cgit v1.1