aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2012-08-31 22:30:33 +0100
committerUbitUmarov2012-08-31 22:30:33 +0100
commit39f5fd0f58dc2fd2fc25308a203988ff55afe56d (patch)
treeca47e9215db0710652068cedf0954f3dd78ba061
parentmove keyframemotion.copy from sop.copy to sog.copy, where there is (diff)
parentMerge branch 'ubitwork' into avination (diff)
downloadopensim-SC_OLD-39f5fd0f58dc2fd2fc25308a203988ff55afe56d.zip
opensim-SC_OLD-39f5fd0f58dc2fd2fc25308a203988ff55afe56d.tar.gz
opensim-SC_OLD-39f5fd0f58dc2fd2fc25308a203988ff55afe56d.tar.bz2
opensim-SC_OLD-39f5fd0f58dc2fd2fc25308a203988ff55afe56d.tar.xz
Merge branch 'avination' into ubitwork
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs60
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
3 files changed, 60 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 75a47d5..d6513c5 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -927,6 +927,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
927 packetInbox.EnqueueHigh(new IncomingPacket((LLClientView)client, packet)); 927 packetInbox.EnqueueHigh(new IncomingPacket((LLClientView)client, packet));
928 else 928 else
929 packetInbox.EnqueueLow(new IncomingPacket((LLClientView)client, packet)); 929 packetInbox.EnqueueLow(new IncomingPacket((LLClientView)client, packet));
930// packetInbox.Enqueue(new IncomingPacket((LLClientView)client, packet));
930 } 931 }
931 932
932 #region BinaryStats 933 #region BinaryStats
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 431b903..e970543 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -422,6 +422,20 @@ namespace OpenSim.Region.Framework.Scenes
422 ); 422 );
423 } 423 }
424 424
425 private class DescendentsRequestData
426 {
427 public IClientAPI RemoteClient;
428 public UUID FolderID;
429 public UUID OwnerID;
430 public bool FetchFolders;
431 public bool FetchItems;
432 public int SortOrder;
433 }
434
435 private Queue<DescendentsRequestData> m_descendentsRequestQueue = new Queue<DescendentsRequestData>();
436 private Object m_descendentsRequestLock = new Object();
437 private bool m_descendentsRequestProcessing = false;
438
425 /// <summary> 439 /// <summary>
426 /// Tell the client about the various child items and folders contained in the requested folder. 440 /// Tell the client about the various child items and folders contained in the requested folder.
427 /// </summary> 441 /// </summary>
@@ -458,17 +472,38 @@ namespace OpenSim.Region.Framework.Scenes
458 } 472 }
459 } 473 }
460 474
461 // We're going to send the reply async, because there may be 475 lock (m_descendentsRequestLock)
462 // an enormous quantity of packets -- basically the entire inventory! 476 {
463 // We don't want to block the client thread while all that is happening. 477 if (!m_descendentsRequestProcessing)
464 SendInventoryDelegate d = SendInventoryAsync; 478 {
465 d.BeginInvoke(remoteClient, folderID, ownerID, fetchFolders, fetchItems, sortOrder, SendInventoryComplete, d); 479 m_descendentsRequestProcessing = true;
480
481 // We're going to send the reply async, because there may be
482 // an enormous quantity of packets -- basically the entire inventory!
483 // We don't want to block the client thread while all that is happening.
484 SendInventoryDelegate d = SendInventoryAsync;
485 d.BeginInvoke(remoteClient, folderID, ownerID, fetchFolders, fetchItems, sortOrder, SendInventoryComplete, d);
486
487 return;
488 }
489
490 DescendentsRequestData req = new DescendentsRequestData();
491 req.RemoteClient = remoteClient;
492 req.FolderID = folderID;
493 req.OwnerID = ownerID;
494 req.FetchFolders = fetchFolders;
495 req.FetchItems = fetchItems;
496 req.SortOrder = sortOrder;
497
498 m_descendentsRequestQueue.Enqueue(req);
499 }
466 } 500 }
467 501
468 delegate void SendInventoryDelegate(IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder); 502 delegate void SendInventoryDelegate(IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
469 503
470 void SendInventoryAsync(IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder) 504 void SendInventoryAsync(IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder)
471 { 505 {
506 Thread.Sleep(20);
472 SendInventoryUpdate(remoteClient, new InventoryFolderBase(folderID), fetchFolders, fetchItems); 507 SendInventoryUpdate(remoteClient, new InventoryFolderBase(folderID), fetchFolders, fetchItems);
473 } 508 }
474 509
@@ -476,6 +511,21 @@ namespace OpenSim.Region.Framework.Scenes
476 { 511 {
477 SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState; 512 SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState;
478 d.EndInvoke(iar); 513 d.EndInvoke(iar);
514
515 lock (m_descendentsRequestLock)
516 {
517 if (m_descendentsRequestQueue.Count > 0)
518 {
519 DescendentsRequestData req = m_descendentsRequestQueue.Dequeue();
520
521 d = SendInventoryAsync;
522 d.BeginInvoke(req.RemoteClient, req.FolderID, req.OwnerID, req.FetchFolders, req.FetchItems, req.SortOrder, SendInventoryComplete, d);
523
524 return;
525 }
526
527 m_descendentsRequestProcessing = false;
528 }
479 } 529 }
480 530
481 /// <summary> 531 /// <summary>
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 207d062..d5e611c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5475,7 +5475,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5475 // for completion and should LSL_Key ever be implemented 5475 // for completion and should LSL_Key ever be implemented
5476 // as it's own struct 5476 // as it's own struct
5477 else if (!(src.Data[index] is LSL_String || 5477 else if (!(src.Data[index] is LSL_String ||
5478 src.Data[index] is LSL_Key)) 5478 src.Data[index] is LSL_Key ||
5479 src.Data[index] is String))
5479 { 5480 {
5480 return ""; 5481 return "";
5481 } 5482 }
@@ -12818,7 +12819,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12818 public void llCollisionSprite(string impact_sprite) 12819 public void llCollisionSprite(string impact_sprite)
12819 { 12820 {
12820 m_host.AddScriptLPS(1); 12821 m_host.AddScriptLPS(1);
12821 NotImplemented("llCollisionSprite"); 12822 // Viewer 2.0 broke this and it's likely LL has no intention
12823 // of fixing it. Therefore, letting this be a NOP seems appropriate.
12822 } 12824 }
12823 12825
12824 public void llGodLikeRezObject(string inventory, LSL_Vector pos) 12826 public void llGodLikeRezObject(string inventory, LSL_Vector pos)