aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs26
-rw-r--r--OpenSim/Grid/InventoryServer/GridInventoryService.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs3
3 files changed, 25 insertions, 6 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 84e42a3..6f7c4da 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -35,6 +35,8 @@ using log4net;
35 35
36namespace OpenSim.Framework.Communications.Cache 36namespace OpenSim.Framework.Communications.Cache
37{ 37{
38 internal delegate void AddItemDelegate(InventoryItemBase itemInfo);
39 internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo);
38 internal delegate void DeleteItemDelegate(LLUUID itemID); 40 internal delegate void DeleteItemDelegate(LLUUID itemID);
39 41
40 internal delegate void CreateFolderDelegate(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID); 42 internal delegate void CreateFolderDelegate(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID);
@@ -532,13 +534,20 @@ namespace OpenSim.Framework.Communications.Cache
532 /// Add an item to the user's inventory 534 /// Add an item to the user's inventory
533 /// </summary> 535 /// </summary>
534 /// <param name="itemInfo"></param> 536 /// <param name="itemInfo"></param>
535 public void AddItem(InventoryItemBase itemInfo) 537 public void AddItem(InventoryItemBase item)
536 { 538 {
537 if (HasInventory) 539 if (HasInventory)
538 { 540 {
539 ItemReceive(itemInfo); 541 ItemReceive(item);
540 m_commsManager.InventoryService.AddItem(itemInfo); 542 m_commsManager.InventoryService.AddItem(item);
541 } 543 }
544 else
545 {
546 AddRequest(
547 new InventoryRequest(
548 Delegate.CreateDelegate(typeof(AddItemDelegate), this, "AddItem"),
549 new object[] { item }));
550 }
542 } 551 }
543 552
544 /// <summary> 553 /// <summary>
@@ -546,12 +555,19 @@ namespace OpenSim.Framework.Communications.Cache
546 /// </summary> 555 /// </summary>
547 /// <param name="userID"></param> 556 /// <param name="userID"></param>
548 /// <param name="itemInfo"></param> 557 /// <param name="itemInfo"></param>
549 public void UpdateItem(InventoryItemBase itemInfo) 558 public void UpdateItem(InventoryItemBase item)
550 { 559 {
551 if (HasInventory) 560 if (HasInventory)
552 { 561 {
553 m_commsManager.InventoryService.UpdateItem(itemInfo); 562 m_commsManager.InventoryService.UpdateItem(item);
554 } 563 }
564 else
565 {
566 AddRequest(
567 new InventoryRequest(
568 Delegate.CreateDelegate(typeof(UpdateItemDelegate), this, "UpdateItem"),
569 new object[] { item }));
570 }
555 } 571 }
556 572
557 /// <summary> 573 /// <summary>
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
index 5c1902f..4864185 100644
--- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs
+++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
@@ -62,7 +62,7 @@ namespace OpenSim.Grid.InventoryServer
62 m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID); 62 m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID);
63 63
64 // uncomment me to simulate an overloaded inventory server 64 // uncomment me to simulate an overloaded inventory server
65 Thread.Sleep(18000); 65 //Thread.Sleep(18000);
66 66
67 InventoryCollection invCollection = new InventoryCollection(); 67 InventoryCollection invCollection = new InventoryCollection();
68 68
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 490457d..1c7e98e 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -486,6 +486,7 @@ namespace OpenSim.Region.Environment.Scenes
486 if (userInfo == null) 486 if (userInfo == null)
487 { 487 {
488 m_log.Error("[AGENT INVENTORY]: Failed to find user " + remoteClient.AgentId.ToString()); 488 m_log.Error("[AGENT INVENTORY]: Failed to find user " + remoteClient.AgentId.ToString());
489
489 return; 490 return;
490 } 491 }
491 492
@@ -509,12 +510,14 @@ namespace OpenSim.Region.Environment.Scenes
509 else 510 else
510 { 511 {
511 m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemID.ToString()); 512 m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemID.ToString());
513
512 return; 514 return;
513 } 515 }
514 } 516 }
515 else 517 else
516 { 518 {
517 m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemID.ToString() + ", no root folder"); 519 m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemID.ToString() + ", no root folder");
520
518 return; 521 return;
519 } 522 }
520 } 523 }