aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs13
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs26
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs3
4 files changed, 32 insertions, 12 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 77dbca7..9895402 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -12148,21 +12148,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12148 protected void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID) 12148 protected void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID)
12149 { 12149 {
12150 UUID requestID = UUID.Zero; 12150 UUID requestID = UUID.Zero;
12151 if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) 12151 int sourceType = transferRequest.TransferInfo.SourceType;
12152
12153 if (sourceType == (int)SourceType.Asset)
12152 { 12154 {
12153 requestID = new UUID(transferRequest.TransferInfo.Params, 0); 12155 requestID = new UUID(transferRequest.TransferInfo.Params, 0);
12154 } 12156 }
12155 else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem) 12157 else if (sourceType == (int)SourceType.SimInventoryItem)
12156 { 12158 {
12157 requestID = new UUID(transferRequest.TransferInfo.Params, 80); 12159 requestID = new UUID(transferRequest.TransferInfo.Params, 80);
12158 } 12160 }
12159 else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimEstate) 12161 else if (sourceType == (int)SourceType.SimEstate)
12160 { 12162 {
12161 requestID = taskID; 12163 requestID = taskID;
12162 } 12164 }
12163 12165
12164 12166// m_log.DebugFormat(
12165// m_log.DebugFormat("[CLIENT]: {0} requesting asset {1}", Name, requestID); 12167// "[LLCLIENTVIEW]: Received transfer request for {0} in {1} type {2} by {3}",
12168// requestID, taskID, (SourceType)sourceType, Name);
12166 12169
12167 12170
12168 //Note, the bool returned from the below function is useless since it is always false. 12171 //Note, the bool returned from the below function is useless since it is always false.
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 75f783b..d310d65 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -155,7 +155,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
155 155
156 private int m_defaultRTO = 0; 156 private int m_defaultRTO = 0;
157 private int m_maxRTO = 0; 157 private int m_maxRTO = 0;
158 158 private int m_ackTimeout = 0;
159 private int m_pausedAckTimeout = 0;
159 private bool m_disableFacelights = false; 160 private bool m_disableFacelights = false;
160 161
161 public Socket Server { get { return null; } } 162 public Socket Server { get { return null; } }
@@ -198,11 +199,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
198 m_defaultRTO = config.GetInt("DefaultRTO", 0); 199 m_defaultRTO = config.GetInt("DefaultRTO", 0);
199 m_maxRTO = config.GetInt("MaxRTO", 0); 200 m_maxRTO = config.GetInt("MaxRTO", 0);
200 m_disableFacelights = config.GetBoolean("DisableFacelights", false); 201 m_disableFacelights = config.GetBoolean("DisableFacelights", false);
202 m_ackTimeout = 1000 * config.GetInt("AckTimeout", 60);
203 m_pausedAckTimeout = 1000 * config.GetInt("PausedAckTimeout", 300);
201 } 204 }
202 else 205 else
203 { 206 {
204 PrimUpdatesPerCallback = 100; 207 PrimUpdatesPerCallback = 100;
205 TextureSendLimit = 20; 208 TextureSendLimit = 20;
209 m_ackTimeout = 1000 * 60; // 1 minute
210 m_pausedAckTimeout = 1000 * 300; // 5 minutes
206 } 211 }
207 212
208 #region BinaryStats 213 #region BinaryStats
@@ -491,8 +496,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
491 return; 496 return;
492 497
493 // Disconnect an agent if no packets are received for some time 498 // Disconnect an agent if no packets are received for some time
494 //FIXME: Make 60 an .ini setting 499 int timeoutTicks = m_ackTimeout;
495 if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > 1000 * 60) 500
501 // Allow more slack if the client is "paused" eg file upload dialogue is open
502 // Some sort of limit is needed in case the client crashes, loses its network connection
503 // or some other disaster prevents it from sendung the AgentResume
504 if (udpClient.IsPaused)
505 timeoutTicks = m_pausedAckTimeout;
506
507 if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > timeoutTicks)
496 { 508 {
497 m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID); 509 m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID);
498 StatsManager.SimExtraStats.AddAbnormalClientThreadTermination(); 510 StatsManager.SimExtraStats.AddAbnormalClientThreadTermination();
@@ -916,7 +928,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
916 UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; 928 UDPPacketBuffer buffer = (UDPPacketBuffer)array[0];
917 UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1]; 929 UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1];
918 930
919 m_log.DebugFormat("[LLUDPSERVER]: Handling UseCircuitCode request from {0}", buffer.RemoteEndPoint); 931 m_log.DebugFormat(
932 "[LLUDPSERVER]: Handling UseCircuitCode request for circuit {0} from {1}",
933 uccp.CircuitCode.Code, buffer.RemoteEndPoint);
920 934
921 remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; 935 remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint;
922 936
@@ -1352,7 +1366,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1352 } 1366 }
1353 else 1367 else
1354 { 1368 {
1355 m_log.DebugFormat("[LLUDPSERVER]: Dropping incoming {0} packet for dead client {1}", packet.Type, udpClient.AgentID); 1369 m_log.DebugFormat(
1370 "[LLUDPSERVER]: Dropped incoming {0} for dead client {1} in {2}",
1371 packet.Type, udpClient.AgentID, m_scene.RegionInfo.RegionName);
1356 } 1372 }
1357 } 1373 }
1358 1374
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
index a575e36..1321470 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
@@ -158,7 +158,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
158 TestHelpers.InMethod(); 158 TestHelpers.InMethod();
159// XmlConfigurator.Configure(); 159// XmlConfigurator.Configure();
160 160
161 TestScene scene = SceneHelpers.SetupScene(); 161 TestScene scene = new SceneHelpers().SetupScene();
162 uint myCircuitCode = 123456; 162 uint myCircuitCode = 123456;
163 UUID myAgentUuid = TestHelpers.ParseTail(0x1); 163 UUID myAgentUuid = TestHelpers.ParseTail(0x1);
164 UUID mySessionUuid = TestHelpers.ParseTail(0x2); 164 UUID mySessionUuid = TestHelpers.ParseTail(0x2);
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs
index 1b68d68..5fcf376 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs
@@ -79,7 +79,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
79 79
80 J2KDecoderModule j2kdm = new J2KDecoderModule(); 80 J2KDecoderModule j2kdm = new J2KDecoderModule();
81 81
82 scene = SceneHelpers.SetupScene(); 82 SceneHelpers sceneHelpers = new SceneHelpers();
83 scene = sceneHelpers.SetupScene();
83 SceneHelpers.SetupSceneModules(scene, j2kdm); 84 SceneHelpers.SetupSceneModules(scene, j2kdm);
84 85
85 tc = new TestClient(SceneHelpers.GenerateAgentData(userId), scene); 86 tc = new TestClient(SceneHelpers.GenerateAgentData(userId), scene);