aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors
diff options
context:
space:
mode:
authorDiva Canto2015-08-08 12:12:50 -0700
committerDiva Canto2015-08-08 12:12:50 -0700
commit959872315f67a1a33a2bae7330749f7dd74a4774 (patch)
treee31f6900453e77815859767cb2331d0412ec5b57 /OpenSim/Services/Connectors
parentHave osAvatarName2Key check the cache first, even for foreign users (diff)
downloadopensim-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/Services/Connectors')
-rw-r--r--OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs6
2 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
index 597d92b..b0615b8 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
@@ -189,7 +189,7 @@ namespace OpenSim.Services.Connectors
189 return BuildFolder((Dictionary<string, object>)ret["folder"]); 189 return BuildFolder((Dictionary<string, object>)ret["folder"]);
190 } 190 }
191 191
192 public InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) 192 public InventoryFolderBase GetFolderForType(UUID principalID, FolderType type)
193 { 193 {
194 Dictionary<string,object> ret = MakeRequest("GETFOLDERFORTYPE", 194 Dictionary<string,object> ret = MakeRequest("GETFOLDERFORTYPE",
195 new Dictionary<string,object> { 195 new Dictionary<string,object> {
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
index a92c4fb..e793420 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
@@ -240,7 +240,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
240 /// <param name="userID"></param> 240 /// <param name="userID"></param>
241 /// <param name="type"></param> 241 /// <param name="type"></param>
242 /// <returns></returns> 242 /// <returns></returns>
243 public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) 243 public InventoryFolderBase GetFolderForType(UUID userID, FolderType type)
244 { 244 {
245 string contentType = SLUtil.SLAssetTypeToContentType((int)type); 245 string contentType = SLUtil.SLAssetTypeToContentType((int)type);
246 246
@@ -580,7 +580,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
580 // A folder of UUID.Zero means we need to find the most appropriate home for this item 580 // A folder of UUID.Zero means we need to find the most appropriate home for this item
581 if (item.Folder == UUID.Zero) 581 if (item.Folder == UUID.Zero)
582 { 582 {
583 InventoryFolderBase folder = GetFolderForType(item.Owner, (AssetType)item.AssetType); 583 InventoryFolderBase folder = null;
584 if (Enum.IsDefined(typeof(FolderType), (sbyte)item.AssetType))
585 folder = GetFolderForType(item.Owner, (FolderType)item.AssetType);
584 if (folder != null && folder.ID != UUID.Zero) 586 if (folder != null && folder.ID != UUID.Zero)
585 item.Folder = folder.ID; 587 item.Folder = folder.ID;
586 else 588 else