aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs15
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs2
-rwxr-xr-xOpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs5
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs4
6 files changed, 6 insertions, 30 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index d63136e..63e3782 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1097,8 +1097,6 @@ namespace OpenSim.Framework
1097 1097
1098 void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures); 1098 void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures);
1099 1099
1100 void SendStartPingCheck(byte seq);
1101
1102 /// <summary> 1100 /// <summary>
1103 /// Tell the client that an object has been deleted 1101 /// Tell the client that an object has been deleted
1104 /// </summary> 1102 /// </summary>
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 4f4bb61..1004b07 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
1891 OutPacket(payPriceReply, ThrottleOutPacketType.Task); 1891 OutPacket(payPriceReply, ThrottleOutPacketType.Task);
1892 } 1892 }
1893 1893
1894 public void SendStartPingCheck(byte seq)
1895 {
1896 StartPingCheckPacket pc = (StartPingCheckPacket)PacketPool.Instance.GetPacket(PacketType.StartPingCheck);
1897 pc.Header.Reliable = false;
1898
1899 pc.PingID.PingID = seq;
1900 // We *could* get OldestUnacked, but it would hurt performance and not provide any benefit
1901 pc.PingID.OldestUnacked = 0;
1902
1903 OutPacket(pc, ThrottleOutPacketType.Unknown);
1904 UDPClient.m_lastStartpingTimeMS = Util.EnvironmentTickCount();
1905 }
1906
1907 public void SendKillObject(List<uint> localIDs) 1894 public void SendKillObject(List<uint> localIDs)
1908 { 1895 {
1909 // foreach (uint id in localIDs) 1896 // foreach (uint id in localIDs)
@@ -8236,7 +8223,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8236 private bool HandleAgentResume(IClientAPI sender, Packet Pack) 8223 private bool HandleAgentResume(IClientAPI sender, Packet Pack)
8237 { 8224 {
8238 m_udpClient.IsPaused = false; 8225 m_udpClient.IsPaused = false;
8239 SendStartPingCheck(m_udpClient.CurrentPingSequence++); 8226 m_udpServer.SendPing(m_udpClient);
8240 return true; 8227 return true;
8241 } 8228 }
8242 8229
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
index 2981337..303f505 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
195 195
196 private float m_burstTime; 196 private float m_burstTime;
197 197
198 public int m_lastStartpingTimeMS; 198 public double m_lastStartpingTimeMS;
199 public int m_pingMS; 199 public int m_pingMS;
200 200
201 public int PingTimeMS 201 public int PingTimeMS
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 79f5fe6..25e4de5 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
1059 buf.DataLength = 12; 1059 buf.DataLength = 12;
1060 SendUDPPacket(udpClient, buf, ThrottleOutPacketType.Unknown, null, false, false); 1060 SendUDPPacket(udpClient, buf, ThrottleOutPacketType.Unknown, null, false, false);
1061 1061
1062 udpClient.m_lastStartpingTimeMS = Util.EnvironmentTickCount(); 1062 udpClient.m_lastStartpingTimeMS = Util.GetTimeStampMS();
1063 } 1063 }
1064 1064
1065 static private readonly byte[] CompletePingCheckHeader = new byte[] { 1065 static private readonly byte[] CompletePingCheckHeader = new byte[] {
@@ -1506,11 +1506,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1506 } 1506 }
1507 else if (packet.Type == PacketType.CompletePingCheck) 1507 else if (packet.Type == PacketType.CompletePingCheck)
1508 { 1508 {
1509 int t = Util.EnvironmentTickCountSubtract(udpClient.m_lastStartpingTimeMS); 1509 double t = Util.GetTimeStampMS() - udpClient.m_lastStartpingTimeMS;
1510 int c = udpClient.m_pingMS; 1510 double c = udpClient.m_pingMS;
1511 c = 800 * c + 200 * t; 1511 c = 800 * c + 200 * t;
1512 c /= 1000; 1512 c /= 1000;
1513 udpClient.m_pingMS = c; 1513 udpClient.m_pingMS = (int)c;
1514 return; 1514 return;
1515 } 1515 }
1516 1516
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 0fc724b..fb195e7 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
967 967
968 } 968 }
969 969
970 public void SendStartPingCheck(byte seq)
971 {
972
973 }
974
975 public void SendKillObject(List<uint> localID) 970 public void SendKillObject(List<uint> localID)
976 { 971 {
977 972
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index de9ab98..022ebdf 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -576,10 +576,6 @@ namespace OpenSim.Tests.Common
576 { 576 {
577 } 577 }
578 578
579 public virtual void SendStartPingCheck(byte seq)
580 {
581 }
582
583 public virtual void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data) 579 public virtual void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data)
584 { 580 {
585 } 581 }