Some more hammering on the head of the obsolete rest inventory handlers, just to make this work.
parent
bd7ff803fe
commit
41839efcc5
|
@ -85,7 +85,7 @@ namespace OpenSim.Server.Handlers.Inventory
|
|||
"POST", "/GetInventory/", GetUserInventory, CheckAuthSession));
|
||||
|
||||
m_httpServer.AddStreamHandler(
|
||||
new RestDeserialiseSecureHandler<Guid, Dictionary<AssetType, InventoryFolderBase>>(
|
||||
new RestDeserialiseSecureHandler<Guid, List<InventoryFolderBase>>(
|
||||
"POST", "/SystemFolders/", GetSystemFolders, CheckAuthSession));
|
||||
|
||||
m_httpServer.AddStreamHandler(
|
||||
|
@ -163,10 +163,10 @@ namespace OpenSim.Server.Handlers.Inventory
|
|||
return m_InventoryService.GetUserInventory(userID);
|
||||
}
|
||||
|
||||
public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(Guid guid)
|
||||
public List<InventoryFolderBase> GetSystemFolders(Guid guid)
|
||||
{
|
||||
UUID userID = new UUID(guid);
|
||||
return GetSystemFolders(userID);
|
||||
return new List<InventoryFolderBase>(GetSystemFolders(userID).Values);
|
||||
}
|
||||
|
||||
// This shouldn't be here, it should be in the inventory service.
|
||||
|
|
|
@ -164,16 +164,20 @@ namespace OpenSim.Services.Connectors
|
|||
public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(string userID, UUID sessionID)
|
||||
{
|
||||
// !!! Not just yet.
|
||||
//try
|
||||
//{
|
||||
// return SynchronousRestSessionObjectPoster<Guid, Dictionary<AssetType, InventoryFolderBase>>.BeginPostObject(
|
||||
// "POST", m_ServerURI + "/SystemFolders/", new Guid(userID), sessionID.ToString(), userID.ToString());
|
||||
//}
|
||||
//catch (Exception e)
|
||||
//{
|
||||
// m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetSystemFolders operation failed, {0} {1}",
|
||||
// e.Source, e.Message);
|
||||
//}
|
||||
try
|
||||
{
|
||||
List<InventoryFolderBase> folders = SynchronousRestSessionObjectPoster<Guid, List<InventoryFolderBase>>.BeginPostObject(
|
||||
"POST", m_ServerURI + "/SystemFolders/", new Guid(userID), sessionID.ToString(), userID.ToString());
|
||||
Dictionary<AssetType, InventoryFolderBase> dFolders = new Dictionary<AssetType, InventoryFolderBase>();
|
||||
foreach (InventoryFolderBase f in folders)
|
||||
dFolders[(AssetType)f.Type] = f;
|
||||
return dFolders;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetSystemFolders operation failed, {0} {1}",
|
||||
e.Source, e.Message);
|
||||
}
|
||||
|
||||
return new Dictionary<AssetType, InventoryFolderBase>();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue