From: Alan Webb <alan_webb@us.ibm.com>
RequestUserInventory is supposed to drive a supplied callback when it completes. In fact, it fails to do so if the user's inventory does not exist (e.g. the inventory database is unavailable for some reason), and the requestor is left sleeping forever. The code has been modified to return empty lists via the callback as an accurate reflection of what is there: nothing.0.6.6-post-fixes
parent
1d02636c27
commit
55442f3644
|
@ -48,15 +48,16 @@ namespace OpenSim.Region.Communications.Local
|
|||
{
|
||||
m_log.InfoFormat("[LOCAL INVENTORY SERVICE]: Requesting inventory for user {0}", userID);
|
||||
|
||||
List<InventoryFolderBase> skeletonFolders = GetInventorySkeleton(userID);
|
||||
if (skeletonFolders == null)
|
||||
return;
|
||||
|
||||
InventoryFolderImpl rootFolder = null;
|
||||
|
||||
List<InventoryFolderImpl> folders = new List<InventoryFolderImpl>();
|
||||
List<InventoryItemBase> items = new List<InventoryItemBase>();
|
||||
|
||||
List<InventoryFolderBase> skeletonFolders = GetInventorySkeleton(userID);
|
||||
|
||||
if (skeletonFolders != null)
|
||||
{
|
||||
|
||||
InventoryFolderImpl rootFolder = null;
|
||||
|
||||
// Need to retrieve the root folder on the first pass
|
||||
foreach (InventoryFolderBase folder in skeletonFolders)
|
||||
{
|
||||
|
@ -84,6 +85,11 @@ namespace OpenSim.Region.Communications.Local
|
|||
m_log.InfoFormat(
|
||||
"[LOCAL INVENTORY SERVICE]: Received inventory response for user {0} containing {1} folders and {2} items",
|
||||
userID, folders.Count, items.Count);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat( "[LOCAL INVENTORY SERVICE]: User {0} inventory not available", userID);
|
||||
}
|
||||
|
||||
callback(folders, items);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue