From Justin Casey (IBM)
When using a local inventory service, this patch stops items held in the root 'my inventory' folder from 'disappearing' on server restart. They were actually still there, we just weren't retrieving them. >From looking at the grid inventory server, the bug probably still exists in there. But I wanted to get this patch in first and consult with MW about the grid fix (he may be planning to change the area extensively soon).afrisby
parent
c5c0df74e6
commit
4b77821275
|
@ -36,10 +36,6 @@ namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
public class LocalInventoryService : InventoryServiceBase
|
public class LocalInventoryService : InventoryServiceBase
|
||||||
{
|
{
|
||||||
public LocalInventoryService()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack,
|
public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack,
|
||||||
InventoryItemInfo itemCallBack)
|
InventoryItemInfo itemCallBack)
|
||||||
{
|
{
|
||||||
|
@ -51,9 +47,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
if (folder.parentID == LLUUID.Zero)
|
if (folder.parentID == LLUUID.Zero)
|
||||||
{
|
{
|
||||||
InventoryFolderImpl newfolder = new InventoryFolderImpl(folder);
|
rootFolder = RequestInventoryFolder(userID, folder, folderCallBack, itemCallBack);
|
||||||
rootFolder = newfolder;
|
|
||||||
folderCallBack(userID, newfolder);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,14 +57,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
if (folder.folderID != rootFolder.folderID)
|
if (folder.folderID != rootFolder.folderID)
|
||||||
{
|
{
|
||||||
InventoryFolderImpl newfolder = new InventoryFolderImpl(folder);
|
RequestInventoryFolder(userID, folder, folderCallBack, itemCallBack);
|
||||||
folderCallBack(userID, newfolder);
|
|
||||||
|
|
||||||
List<InventoryItemBase> items = RequestFolderItems(newfolder.folderID);
|
|
||||||
foreach (InventoryItemBase item in items)
|
|
||||||
{
|
|
||||||
itemCallBack(userID, item);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,5 +77,26 @@ namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
DeleteItem(item);
|
DeleteItem(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Send the given inventory folder and its item contents back to the requester.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userID"></param>
|
||||||
|
/// <param name="folder"></param>
|
||||||
|
private InventoryFolderImpl RequestInventoryFolder(LLUUID userID, InventoryFolderBase folder,
|
||||||
|
InventoryFolderInfo folderCallBack,
|
||||||
|
InventoryItemInfo itemCallBack)
|
||||||
|
{
|
||||||
|
InventoryFolderImpl newFolder = new InventoryFolderImpl(folder);
|
||||||
|
folderCallBack(userID, newFolder);
|
||||||
|
|
||||||
|
List<InventoryItemBase> items = RequestFolderItems(newFolder.folderID);
|
||||||
|
foreach (InventoryItemBase item in items)
|
||||||
|
{
|
||||||
|
itemCallBack(userID, item);
|
||||||
|
}
|
||||||
|
|
||||||
|
return newFolder;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue