Some more hammering on the head of the obsolete rest inventory handlers, just to make this work.

arthursv
Diva Canto 2009-08-11 14:52:17 -07:00
parent bd7ff803fe
commit 41839efcc5
2 changed files with 17 additions and 13 deletions

View File

@ -85,7 +85,7 @@ namespace OpenSim.Server.Handlers.Inventory
"POST", "/GetInventory/", GetUserInventory, CheckAuthSession)); "POST", "/GetInventory/", GetUserInventory, CheckAuthSession));
m_httpServer.AddStreamHandler( m_httpServer.AddStreamHandler(
new RestDeserialiseSecureHandler<Guid, Dictionary<AssetType, InventoryFolderBase>>( new RestDeserialiseSecureHandler<Guid, List<InventoryFolderBase>>(
"POST", "/SystemFolders/", GetSystemFolders, CheckAuthSession)); "POST", "/SystemFolders/", GetSystemFolders, CheckAuthSession));
m_httpServer.AddStreamHandler( m_httpServer.AddStreamHandler(
@ -163,10 +163,10 @@ namespace OpenSim.Server.Handlers.Inventory
return m_InventoryService.GetUserInventory(userID); return m_InventoryService.GetUserInventory(userID);
} }
public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(Guid guid) public List<InventoryFolderBase> GetSystemFolders(Guid guid)
{ {
UUID userID = new UUID(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. // This shouldn't be here, it should be in the inventory service.

View File

@ -164,16 +164,20 @@ namespace OpenSim.Services.Connectors
public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(string userID, UUID sessionID) public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(string userID, UUID sessionID)
{ {
// !!! Not just yet. // !!! Not just yet.
//try try
//{ {
// return SynchronousRestSessionObjectPoster<Guid, Dictionary<AssetType, InventoryFolderBase>>.BeginPostObject( List<InventoryFolderBase> folders = SynchronousRestSessionObjectPoster<Guid, List<InventoryFolderBase>>.BeginPostObject(
// "POST", m_ServerURI + "/SystemFolders/", new Guid(userID), sessionID.ToString(), userID.ToString()); "POST", m_ServerURI + "/SystemFolders/", new Guid(userID), sessionID.ToString(), userID.ToString());
//} Dictionary<AssetType, InventoryFolderBase> dFolders = new Dictionary<AssetType, InventoryFolderBase>();
//catch (Exception e) foreach (InventoryFolderBase f in folders)
//{ dFolders[(AssetType)f.Type] = f;
// m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetSystemFolders operation failed, {0} {1}", return dFolders;
// e.Source, e.Message); }
//} catch (Exception e)
{
m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetSystemFolders operation failed, {0} {1}",
e.Source, e.Message);
}
return new Dictionary<AssetType, InventoryFolderBase>(); return new Dictionary<AssetType, InventoryFolderBase>();
} }