* Fix problem where inventory code throws a swallowed exception on grid mode if the avatar has never logged in before
parent
5f04cebb25
commit
af3118eccd
|
@ -79,25 +79,41 @@ namespace OpenSim.Framework.Communications
|
||||||
// See IInventoryServices
|
// See IInventoryServices
|
||||||
public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId)
|
public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId)
|
||||||
{
|
{
|
||||||
//m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
|
try
|
||||||
|
|
||||||
List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>();
|
|
||||||
|
|
||||||
InventoryFolderBase rootFolder = RequestRootFolder(userId);
|
|
||||||
userFolders.Add(rootFolder);
|
|
||||||
|
|
||||||
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
|
||||||
{
|
{
|
||||||
IList<InventoryFolderBase> folders = plugin.Value.getFolderHierarchy(rootFolder.folderID);
|
m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
|
||||||
userFolders.AddRange(folders);
|
|
||||||
}
|
List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>();
|
||||||
|
|
||||||
|
InventoryFolderBase rootFolder = RequestRootFolder(userId);
|
||||||
|
|
||||||
|
// Agent is completely new and has no inventory structure yet.
|
||||||
|
if (null == rootFolder)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
userFolders.Add(rootFolder);
|
||||||
|
|
||||||
|
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
||||||
|
{
|
||||||
|
IList<InventoryFolderBase> folders = plugin.Value.getFolderHierarchy(rootFolder.folderID);
|
||||||
|
userFolders.AddRange(folders);
|
||||||
|
}
|
||||||
|
|
||||||
|
// foreach (InventoryFolderBase folder in userFolders)
|
||||||
|
// {
|
||||||
|
// m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID);
|
||||||
|
// }
|
||||||
|
|
||||||
|
return userFolders;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat("GetInventorySkeleton() exception {0}", e);
|
||||||
|
}
|
||||||
|
|
||||||
// foreach (InventoryFolderBase folder in userFolders)
|
return null;
|
||||||
// {
|
|
||||||
// m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID);
|
|
||||||
// }
|
|
||||||
|
|
||||||
return userFolders;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// See IInventoryServices
|
// See IInventoryServices
|
||||||
|
|
|
@ -1201,7 +1201,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// Duplicate the given object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="originalPrim"></param>
|
/// <param name="originalPrim"></param>
|
||||||
/// <param name="offset"></param>
|
/// <param name="offset"></param>
|
||||||
|
|
Loading…
Reference in New Issue