* Send full inventory folder skeleton to standalone client logins rather than just the root child folders
* This may resolve some current problems with non root child folders on standalone installations. * A fix for the same problem in grid mode will come soon.0.6.0-stable
parent
35dec2e53a
commit
0a47a75b88
|
@ -31,6 +31,9 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
{
|
||||
public class CachedUserInfo
|
||||
{
|
||||
private static readonly log4net.ILog m_log
|
||||
= log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private readonly CommunicationsManager m_parentCommsManager;
|
||||
// Fields
|
||||
public InventoryFolderImpl RootFolder = null;
|
||||
|
@ -44,6 +47,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
// Methods
|
||||
public void FolderReceive(LLUUID userID, InventoryFolderImpl folderInfo)
|
||||
{
|
||||
//m_log.DebugFormat("[INVENTORY CACHE]: Received folder {0} {1} for user {2}", folderInfo.name, folderInfo.folderID, userID);
|
||||
|
||||
if (userID == UserProfile.UUID)
|
||||
{
|
||||
if (RootFolder == null)
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[USERCACHE]: User profile for user {0} not found", userID);
|
||||
m_log.ErrorFormat("[USER CACHE]: User profile for user {0} not found", userID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -244,15 +244,14 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[INVENTORYCACHE]: Could not find root folder for user {0}", remoteClient.Name);
|
||||
m_log.ErrorFormat("[INVENTORY CACHE]: Could not find root folder for user {0}", remoteClient.Name);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[INVENTORYCACHE]: " +
|
||||
"Could not find user profile for {0} for folder {1}",
|
||||
m_log.ErrorFormat("[INVENTORY CACHE]: Could not find user profile for {0} for folder {1}",
|
||||
remoteClient.Name, folderID);
|
||||
|
||||
return;
|
||||
|
@ -260,8 +259,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
// If we've reached this point then we couldn't find the folder, even though the client thinks
|
||||
// it exists
|
||||
m_log.ErrorFormat("[INVENTORYCACHE]: " +
|
||||
"Could not find folder {0} for user {1}",
|
||||
m_log.ErrorFormat("[INVENTORY CACHE]: Could not find folder {0} for user {1}",
|
||||
folderID, remoteClient.Name);
|
||||
}
|
||||
|
||||
|
@ -303,14 +301,14 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[INVENTORYCACHE]: Could not find root folder for user {0}", agentID.ToString());
|
||||
m_log.ErrorFormat("[INVENTORY CACHE]: Could not find root folder for user {0}", agentID.ToString());
|
||||
|
||||
return new List<InventoryItemBase>(); ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[INVENTORYCACHE]: " +
|
||||
m_log.ErrorFormat("[INVENTORY CACHE]: " +
|
||||
"Could not find user profile for {0} for folder {1}",
|
||||
agentID.ToString(), folderID);
|
||||
return new List<InventoryItemBase>();
|
||||
|
@ -318,7 +316,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
// If we've reached this point then we couldn't find the folder, even though the client thinks
|
||||
// it exists
|
||||
m_log.ErrorFormat("[INVENTORYCACHE]: " +
|
||||
m_log.ErrorFormat("[INVENTORY CACHE]: " +
|
||||
"Could not find folder {0} for user {1}",
|
||||
folderID, agentID.ToString());
|
||||
// }
|
||||
|
|
|
@ -87,6 +87,14 @@ namespace OpenSim.Framework.Communications
|
|||
/// <param name="userID"></param>
|
||||
/// <returns></returns>
|
||||
List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of all the folders in a given user's inventory.
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns>A flat list of the user's inventory folder tree.
|
||||
/// Null if there is no inventory for this user</returns>
|
||||
List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the named folder in that users inventory, returns null if folder is not found.
|
||||
|
|
|
@ -108,6 +108,30 @@ namespace OpenSim.Framework.Communications
|
|||
|
||||
return inventoryList;
|
||||
}
|
||||
|
||||
// See IInventoryServices
|
||||
public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId)
|
||||
{
|
||||
// m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
|
||||
|
||||
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);
|
||||
userFolders.AddRange(folders);
|
||||
}
|
||||
|
||||
// foreach (InventoryFolderBase folder in userFolders)
|
||||
// {
|
||||
// m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID);
|
||||
// }
|
||||
|
||||
return userFolders;
|
||||
}
|
||||
|
||||
// See IInventoryServices
|
||||
public void MoveInventoryFolder(LLUUID userID, InventoryFolderBase folder)
|
||||
|
|
|
@ -43,7 +43,8 @@ namespace OpenSim.Framework.UserManagement
|
|||
/// </summary>
|
||||
public abstract class UserManagerBase : IUserService
|
||||
{
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static readonly log4net.ILog m_log
|
||||
= log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public UserConfig _config;
|
||||
private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>();
|
||||
|
|
|
@ -652,12 +652,8 @@ namespace OpenSim.Framework.Data.MSSQL
|
|||
folders.Add(f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all child folders in the hierarchy from the parent folder and down
|
||||
/// </summary>
|
||||
/// <param name="parentID">The folder to get subfolders for</param>
|
||||
/// <returns>A list of inventory folders</returns>
|
||||
protected List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID)
|
||||
// See IInventoryData
|
||||
public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID)
|
||||
{
|
||||
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
||||
getInventoryFolders(ref folders, parentID);
|
||||
|
|
|
@ -573,12 +573,8 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
folders.Add(f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all child folders in the hierarchy from the parent folder and down
|
||||
/// </summary>
|
||||
/// <param name="parentID">The folder to get subfolders for</param>
|
||||
/// <returns>A list of inventory folders</returns>
|
||||
protected List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID)
|
||||
// See IInventoryData
|
||||
public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID)
|
||||
{
|
||||
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
||||
getInventoryFolders(ref folders, parentID);
|
||||
|
|
|
@ -319,12 +319,8 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
return folders;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all child folders in the hierarchy from the parent folder and down
|
||||
/// </summary>
|
||||
/// <param name="parentID">The folder to get subfolders for</param>
|
||||
/// <returns>A list of inventory folders</returns>
|
||||
protected List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID)
|
||||
// See IInventoryData
|
||||
public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID)
|
||||
{
|
||||
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
||||
getInventoryFolders(ref folders, Util.ToRawUuidString(parentID));
|
||||
|
|
|
@ -165,6 +165,14 @@ namespace OpenSim.Framework
|
|||
/// </summary>
|
||||
/// <returns>A string containing the plugin version</returns>
|
||||
string getVersion();
|
||||
|
||||
/// <summary>
|
||||
/// Returns all child folders in the hierarchy from the parent folder and down.
|
||||
/// Does not return the parent folder itself.
|
||||
/// </summary>
|
||||
/// <param name="parentID">The folder to get subfolders for</param>
|
||||
/// <returns>A list of inventory folders</returns>
|
||||
List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of inventory items contained within the specified folder
|
||||
|
|
|
@ -42,7 +42,9 @@ namespace OpenSim.Region.Communications.Local
|
|||
public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack,
|
||||
InventoryItemInfo itemCallBack)
|
||||
{
|
||||
List<InventoryFolderBase> folders = RequestFirstLevelFolders(userID);
|
||||
//List<InventoryFolderBase> folders = RequestFirstLevelFolders(userID);
|
||||
List<InventoryFolderBase> folders = GetInventorySkeleton(userID);
|
||||
|
||||
InventoryFolderImpl rootFolder = null;
|
||||
|
||||
//need to make sure we send root folder first
|
||||
|
|
|
@ -215,7 +215,8 @@ namespace OpenSim.Region.Communications.Local
|
|||
// See LoginService
|
||||
protected override InventoryData GetInventorySkeleton(LLUUID userID)
|
||||
{
|
||||
List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID);
|
||||
List<InventoryFolderBase> folders = m_Parent.InventoryService.GetInventorySkeleton(userID);
|
||||
//List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID);
|
||||
if (folders.Count > 0)
|
||||
{
|
||||
LLUUID rootID = LLUUID.Zero;
|
||||
|
|
|
@ -216,6 +216,14 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
public void CreateNewUserInventory(LLUUID user)
|
||||
{
|
||||
}
|
||||
|
||||
// See IInventoryServices
|
||||
public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId)
|
||||
{
|
||||
m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: The GetInventorySkeleton() method here should never be called!");
|
||||
|
||||
return new List<InventoryFolderBase>();
|
||||
}
|
||||
|
||||
public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue