diff options
author | Diva Canto | 2015-08-08 12:12:50 -0700 |
---|---|---|
committer | Diva Canto | 2015-08-08 12:12:50 -0700 |
commit | 959872315f67a1a33a2bae7330749f7dd74a4774 (patch) | |
tree | e31f6900453e77815859767cb2331d0412ec5b57 /OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory | |
parent | Have osAvatarName2Key check the cache first, even for foreign users (diff) | |
download | opensim-SC_OLD-959872315f67a1a33a2bae7330749f7dd74a4774.zip opensim-SC_OLD-959872315f67a1a33a2bae7330749f7dd74a4774.tar.gz opensim-SC_OLD-959872315f67a1a33a2bae7330749f7dd74a4774.tar.bz2 opensim-SC_OLD-959872315f67a1a33a2bae7330749f7dd74a4774.tar.xz |
WARNING: massive refactor to follow libomv's latest changes regarding inventory folders. The newest version of libomv itself is committed here. Basically, everything that was using the AssetType enum has been combed through; many of those uses were changed to the new FolderType enum.
This means that from now on, [new] root folders have code 8 (FolderType.Root), as the viewers expect, as opposed to 9, which was what we had been doing. Normal folders are as they were, -1. Also now sending folder code 100 for Suitcase folders to viewers, with no filter.
All tests pass, but fingers crossed!
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory')
4 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index 6a83b42..48f228a 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -345,7 +345,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
345 | return root; | 345 | return root; |
346 | } | 346 | } |
347 | 347 | ||
348 | public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) | 348 | public InventoryFolderBase GetFolderForType(UUID userID, FolderType type) |
349 | { | 349 | { |
350 | //m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetFolderForType {0} type {1}", userID, type); | 350 | //m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetFolderForType {0} type {1}", userID, type); |
351 | InventoryFolderBase f = m_Cache.GetFolderForType(userID, type); | 351 | InventoryFolderBase f = m_Cache.GetFolderForType(userID, type); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs index 71dc337..3195e6b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
41 | private const double CACHE_EXPIRATION_SECONDS = 3600.0; // 1 hour | 41 | private const double CACHE_EXPIRATION_SECONDS = 3600.0; // 1 hour |
42 | 42 | ||
43 | private static ExpiringCache<UUID, InventoryFolderBase> m_RootFolders = new ExpiringCache<UUID, InventoryFolderBase>(); | 43 | private static ExpiringCache<UUID, InventoryFolderBase> m_RootFolders = new ExpiringCache<UUID, InventoryFolderBase>(); |
44 | private static ExpiringCache<UUID, Dictionary<AssetType, InventoryFolderBase>> m_FolderTypes = new ExpiringCache<UUID, Dictionary<AssetType, InventoryFolderBase>>(); | 44 | private static ExpiringCache<UUID, Dictionary<FolderType, InventoryFolderBase>> m_FolderTypes = new ExpiringCache<UUID, Dictionary<FolderType, InventoryFolderBase>>(); |
45 | private static ExpiringCache<UUID, InventoryCollection> m_Inventories = new ExpiringCache<UUID, InventoryCollection>(); | 45 | private static ExpiringCache<UUID, InventoryCollection> m_Inventories = new ExpiringCache<UUID, InventoryCollection>(); |
46 | 46 | ||
47 | public void Cache(UUID userID, InventoryFolderBase root) | 47 | public void Cache(UUID userID, InventoryFolderBase root) |
@@ -58,12 +58,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
58 | return null; | 58 | return null; |
59 | } | 59 | } |
60 | 60 | ||
61 | public void Cache(UUID userID, AssetType type, InventoryFolderBase folder) | 61 | public void Cache(UUID userID, FolderType type, InventoryFolderBase folder) |
62 | { | 62 | { |
63 | Dictionary<AssetType, InventoryFolderBase> ff = null; | 63 | Dictionary<FolderType, InventoryFolderBase> ff = null; |
64 | if (!m_FolderTypes.TryGetValue(userID, out ff)) | 64 | if (!m_FolderTypes.TryGetValue(userID, out ff)) |
65 | { | 65 | { |
66 | ff = new Dictionary<AssetType, InventoryFolderBase>(); | 66 | ff = new Dictionary<FolderType, InventoryFolderBase>(); |
67 | m_FolderTypes.Add(userID, ff, CACHE_EXPIRATION_SECONDS); | 67 | m_FolderTypes.Add(userID, ff, CACHE_EXPIRATION_SECONDS); |
68 | } | 68 | } |
69 | 69 | ||
@@ -77,9 +77,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) | 80 | public InventoryFolderBase GetFolderForType(UUID userID, FolderType type) |
81 | { | 81 | { |
82 | Dictionary<AssetType, InventoryFolderBase> ff = null; | 82 | Dictionary<FolderType, InventoryFolderBase> ff = null; |
83 | if (m_FolderTypes.TryGetValue(userID, out ff)) | 83 | if (m_FolderTypes.TryGetValue(userID, out ff)) |
84 | { | 84 | { |
85 | InventoryFolderBase f = null; | 85 | InventoryFolderBase f = null; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index 2f29a7c..20d4e02 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -170,7 +170,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
170 | return m_InventoryService.GetRootFolder(userID); | 170 | return m_InventoryService.GetRootFolder(userID); |
171 | } | 171 | } |
172 | 172 | ||
173 | public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) | 173 | public InventoryFolderBase GetFolderForType(UUID userID, FolderType type) |
174 | { | 174 | { |
175 | return m_InventoryService.GetFolderForType(userID, type); | 175 | return m_InventoryService.GetFolderForType(userID, type); |
176 | } | 176 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index e0cc1e8..978b9d9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs | |||
@@ -177,7 +177,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
177 | return m_RemoteConnector.GetRootFolder(userID); | 177 | return m_RemoteConnector.GetRootFolder(userID); |
178 | } | 178 | } |
179 | 179 | ||
180 | public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) | 180 | public InventoryFolderBase GetFolderForType(UUID userID, FolderType type) |
181 | { | 181 | { |
182 | return m_RemoteConnector.GetFolderForType(userID, type); | 182 | return m_RemoteConnector.GetFolderForType(userID, type); |
183 | } | 183 | } |