aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-05-09 21:33:19 +0000
committerJustin Clarke Casey2008-05-09 21:33:19 +0000
commit3f345bf685a80189c8a33ec1514c356064a6fa70 (patch)
treea13c5e53faff34b77f974f3a585f5f53c4a7cceb /OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
parentm_logs always need to be private static readonly otherwise we (diff)
downloadopensim-SC_OLD-3f345bf685a80189c8a33ec1514c356064a6fa70.zip
opensim-SC_OLD-3f345bf685a80189c8a33ec1514c356064a6fa70.tar.gz
opensim-SC_OLD-3f345bf685a80189c8a33ec1514c356064a6fa70.tar.bz2
opensim-SC_OLD-3f345bf685a80189c8a33ec1514c356064a6fa70.tar.xz
* Removing polling delay for non-CAPS inventory fetch if the client has not yet received data from the inventory service
* Replaced instead with the system now used by other requests where the fetch request is placed on a queue and service when the data comes in
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs51
1 files changed, 50 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 03ba1db..218fd5a 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -42,7 +42,10 @@ namespace OpenSim.Framework.Communications.Cache
42 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);
43 internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID); 43 internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID);
44 internal delegate void PurgeFolderDelegate(LLUUID folderID); 44 internal delegate void PurgeFolderDelegate(LLUUID folderID);
45 internal delegate void UpdateFolderDelegate(string name, LLUUID folderID, ushort type, LLUUID parentID); 45 internal delegate void UpdateFolderDelegate(string name, LLUUID folderID, ushort type, LLUUID parentID);
46
47 internal delegate void SendInventoryDescendentsDelegate(
48 IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems);
46 49
47 /// <summary> 50 /// <summary>
48 /// Stores user profile and inventory data received from backend services for a particular user. 51 /// Stores user profile and inventory data received from backend services for a particular user.
@@ -557,6 +560,52 @@ namespace OpenSim.Framework.Communications.Cache
557 560
558 return false; 561 return false;
559 } 562 }
563
564 /// <summary>
565 /// Send details of the inventory items and/or folders in a given folder to the client.
566 /// </summary>
567 /// <param name="client"></param>
568 /// <param name="folderID"></param>
569 /// <param name="fetchFolders"></param>
570 /// <param name="fetchItems"></param>
571 /// <returns>true if the request was queued or successfully processed, false otherwise</returns>
572 public bool SendInventoryDecendents(IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems)
573 {
574 if (HasInventory)
575 {
576 InventoryFolderImpl folder;
577
578 if ((folder = RootFolder.FindFolder(folderID)) != null)
579 {
580// m_log.DebugFormat(
581// "[AGENT INVENTORY]: Found folder {0} for client {1}",
582// folderID, remoteClient.AgentId);
583
584 client.SendInventoryFolderDetails(
585 client.AgentId, folderID, folder.RequestListOfItems(),
586 folder.RequestListOfFolders(), fetchFolders, fetchItems);
587
588 return true;
589 }
590 else
591 {
592 m_log.WarnFormat(
593 "[AGENT INVENTORY]: Could not find folder {0} requested by user {1} {2}",
594 folderID, client.Name, client.AgentId);
595
596 return false;
597 }
598 }
599 else
600 {
601 AddRequest(
602 new InventoryRequest(
603 Delegate.CreateDelegate(typeof(SendInventoryDescendentsDelegate), this, "SendInventoryDecendents"),
604 new object[] { client, folderID, fetchFolders, fetchItems }));
605
606 return true;
607 }
608 }
560 } 609 }
561 610
562 /// <summary> 611 /// <summary>