diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index d63136e332..63e3782606 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -1097,8 +1097,6 @@ namespace OpenSim.Framework void SendCachedTextureResponse(ISceneEntity avatar, int serial, List cachedTextures); - void SendStartPingCheck(byte seq); - /// /// Tell the client that an object has been deleted /// diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 4f4bb61112..1004b075bb 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -1891,19 +1891,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(payPriceReply, ThrottleOutPacketType.Task); } - public void SendStartPingCheck(byte seq) - { - StartPingCheckPacket pc = (StartPingCheckPacket)PacketPool.Instance.GetPacket(PacketType.StartPingCheck); - pc.Header.Reliable = false; - - pc.PingID.PingID = seq; - // We *could* get OldestUnacked, but it would hurt performance and not provide any benefit - pc.PingID.OldestUnacked = 0; - - OutPacket(pc, ThrottleOutPacketType.Unknown); - UDPClient.m_lastStartpingTimeMS = Util.EnvironmentTickCount(); - } - public void SendKillObject(List localIDs) { // foreach (uint id in localIDs) @@ -8236,7 +8223,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP private bool HandleAgentResume(IClientAPI sender, Packet Pack) { m_udpClient.IsPaused = false; - SendStartPingCheck(m_udpClient.CurrentPingSequence++); + m_udpServer.SendPing(m_udpClient); return true; } diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index 2981337b2d..303f5054fd 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs @@ -195,7 +195,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP private float m_burstTime; - public int m_lastStartpingTimeMS; + public double m_lastStartpingTimeMS; public int m_pingMS; public int PingTimeMS diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 79f5fe614e..25e4de5343 100755 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1059,7 +1059,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP buf.DataLength = 12; SendUDPPacket(udpClient, buf, ThrottleOutPacketType.Unknown, null, false, false); - udpClient.m_lastStartpingTimeMS = Util.EnvironmentTickCount(); + udpClient.m_lastStartpingTimeMS = Util.GetTimeStampMS(); } static private readonly byte[] CompletePingCheckHeader = new byte[] { @@ -1506,11 +1506,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else if (packet.Type == PacketType.CompletePingCheck) { - int t = Util.EnvironmentTickCountSubtract(udpClient.m_lastStartpingTimeMS); - int c = udpClient.m_pingMS; + double t = Util.GetTimeStampMS() - udpClient.m_lastStartpingTimeMS; + double c = udpClient.m_pingMS; c = 800 * c + 200 * t; c /= 1000; - udpClient.m_pingMS = c; + udpClient.m_pingMS = (int)c; return; } diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 0fc724b379..fb195e7119 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -967,11 +967,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendStartPingCheck(byte seq) - { - - } - public void SendKillObject(List localID) { diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index de9ab98779..022ebdfe0b 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -576,10 +576,6 @@ namespace OpenSim.Tests.Common { } - public virtual void SendStartPingCheck(byte seq) - { - } - public virtual void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List Data) { }