aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2019-06-12 01:43:32 +0100
committerUbitUmarov2019-06-12 01:43:32 +0100
commitda90da220e72ae08a2819111ce3f4c7746609719 (patch)
tree39e977a6d42b2091a9c83ad94b9465cf328d65e8 /OpenSim
parenta few more changes to lludp Xfer download (diff)
downloadopensim-SC-da90da220e72ae08a2819111ce3f4c7746609719.zip
opensim-SC-da90da220e72ae08a2819111ce3f4c7746609719.tar.gz
opensim-SC-da90da220e72ae08a2819111ce3f4c7746609719.tar.bz2
opensim-SC-da90da220e72ae08a2819111ce3f4c7746609719.tar.xz
still a few more changes to lludp Xfer download for lost udp case
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs19
1 files changed, 10 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
index dd37263..056e786 100644
--- a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
@@ -233,7 +233,6 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
233 public void transfersTimeTick(double now) 233 public void transfersTimeTick(double now)
234 { 234 {
235 XferDownLoad[] xfrs; 235 XferDownLoad[] xfrs;
236 int inow = (int)now;
237 lock(Transfers) 236 lock(Transfers)
238 { 237 {
239 if(Transfers.Count == 0) 238 if(Transfers.Count == 0)
@@ -244,7 +243,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
244 } 243 }
245 foreach(XferDownLoad xfr in xfrs) 244 foreach(XferDownLoad xfr in xfrs)
246 { 245 {
247 if(xfr.checkTime(inow)) 246 if(xfr.checkTime(now))
248 { 247 {
249 ulong xfrID = xfr.XferID; 248 ulong xfrID = xfr.XferID;
250 lock(Transfers) 249 lock(Transfers)
@@ -328,7 +327,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
328 public bool isDeleted = false; 327 public bool isDeleted = false;
329 328
330 private object myLock = new object(); 329 private object myLock = new object();
331 private int lastACKTimeMS; 330 private double lastACKTimeMS;
332 private int LastPacket; 331 private int LastPacket;
333 private int lastBytes; 332 private int lastBytes;
334 private int lastSentPacket; 333 private int lastSentPacket;
@@ -389,6 +388,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
389 lastSentPacket = -1; 388 lastSentPacket = -1;
390 389
391 double now = Util.GetTimeStampMS(); 390 double now = Util.GetTimeStampMS();
391 retries = 0;
392 392
393 SendBurst(now); 393 SendBurst(now);
394 return; 394 return;
@@ -428,7 +428,6 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
428 428
429 remoteClient.SendXferPacket(XferID, pktid, Data, pkt << 10, pktsize, true); 429 remoteClient.SendXferPacket(XferID, pktid, Data, pkt << 10, pktsize, true);
430 430
431 retries = 0;
432 lastSentPacket = pkt; 431 lastSentPacket = pkt;
433 } 432 }
434 433
@@ -445,8 +444,10 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
445 return true; 444 return true;
446 445
447 packet &= 0x7fffffff; 446 packet &= 0x7fffffff;
448 if(lastAckPacket < packet) 447 if(lastAckPacket >= packet)
449 lastAckPacket = (int)packet; 448 return false;
449
450 lastAckPacket = (int)packet;
450 451
451 if(lastAckPacket == LastPacket) 452 if(lastAckPacket == LastPacket)
452 { 453 {
@@ -463,15 +464,15 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
463 } 464 }
464 } 465 }
465 466
466 public bool checkTime(int now) 467 public bool checkTime(double now)
467 { 468 {
468 if (Monitor.TryEnter(myLock)) 469 if (Monitor.TryEnter(myLock))
469 { 470 {
470 if (!isDeleted && !inBurst) 471 if (!isDeleted && !inBurst)
471 { 472 {
472 int timeMS = now - lastACKTimeMS; 473 double timeMS = now - lastACKTimeMS;
473 474
474 int tout = 5 * remoteClient.PingTimeMS; 475 double tout = 5 * remoteClient.PingTimeMS;
475 if(tout > 10000) 476 if(tout > 10000)
476 tout = 10000; 477 tout = 10000;
477 else if (tout < 500) 478 else if (tout < 500)