Mantis#1514. Thank you kindly, Boscata for an InventoryServer patch
to allow the InventoryServer to work with MSSQL..0.6.0-stable
parent
aba396cb32
commit
7821cca2f5
|
@ -379,7 +379,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
baseFolder.Type = (short) type;
|
baseFolder.Type = (short) type;
|
||||||
baseFolder.Version = RootFolder.Version;
|
baseFolder.Version = RootFolder.Version;
|
||||||
|
|
||||||
m_commsManager.InventoryService.AddFolder(baseFolder);
|
m_commsManager.InventoryService.UpdateFolder(baseFolder);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,6 +57,13 @@ namespace OpenSim.Framework.Communications
|
||||||
/// <returns>true if the folder was successfully added</returns>
|
/// <returns>true if the folder was successfully added</returns>
|
||||||
bool AddFolder(InventoryFolderBase folder);
|
bool AddFolder(InventoryFolderBase folder);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update a folder in the user's inventory
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="folder"></param>
|
||||||
|
/// <returns>true if the folder was successfully updated</returns>
|
||||||
|
bool UpdateFolder(InventoryFolderBase folder);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Move an inventory folder to a new location
|
/// Move an inventory folder to a new location
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -198,6 +198,21 @@ namespace OpenSim.Framework.Communications
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// See IInventoryServices
|
||||||
|
public bool UpdateFolder(InventoryFolderBase folder)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[AGENT INVENTORY]: Updating folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
|
||||||
|
|
||||||
|
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
||||||
|
{
|
||||||
|
plugin.Value.updateInventoryFolder(folder);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME: Should return false on failure
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// See IInventoryServices
|
// See IInventoryServices
|
||||||
public bool MoveFolder(InventoryFolderBase folder)
|
public bool MoveFolder(InventoryFolderBase folder)
|
||||||
{
|
{
|
||||||
|
|
|
@ -96,6 +96,10 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
new RestDeserialisehandler<InventoryFolderBase, bool>(
|
new RestDeserialisehandler<InventoryFolderBase, bool>(
|
||||||
"POST", "/NewFolder/", m_inventoryService.AddFolder));
|
"POST", "/NewFolder/", m_inventoryService.AddFolder));
|
||||||
|
|
||||||
|
m_httpServer.AddStreamHandler(
|
||||||
|
new RestDeserialisehandler<InventoryFolderBase, bool>(
|
||||||
|
"POST", "/UpdateFolder/", m_inventoryService.UpdateFolder));
|
||||||
|
|
||||||
m_httpServer.AddStreamHandler(
|
m_httpServer.AddStreamHandler(
|
||||||
new RestDeserialisehandler<InventoryFolderBase, bool>(
|
new RestDeserialisehandler<InventoryFolderBase, bool>(
|
||||||
"POST", "/MoveFolder/", m_inventoryService.MoveFolder));
|
"POST", "/MoveFolder/", m_inventoryService.MoveFolder));
|
||||||
|
|
|
@ -175,6 +175,26 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="folder"></param>
|
||||||
|
public bool UpdateFolder(InventoryFolderBase folder)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>(
|
||||||
|
"POST", _inventoryServerUrl + "/UpdateFolder/", folder);
|
||||||
|
}
|
||||||
|
catch (WebException e)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Update inventory folder operation failed, {0} {1}",
|
||||||
|
e.Source, e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
|
/// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue