disabled the multiple inventory server support in login service again.

And reverted CachedUserInfo back to revision 5262. 
I don't think most of the inventory problems that people are reporting are due to these, but its easier to deal with one set of potential problems at a time, and I'm not going to get any time in the week to work on this anyway.
0.6.0-stable
MW 2008-06-29 20:39:34 +00:00
parent d8e18ad0f0
commit b0330a0bb5
4 changed files with 65 additions and 135 deletions

View File

@ -87,24 +87,6 @@ namespace OpenSim.Framework.Communications.Cache
private IDictionary<LLUUID, IList<InventoryFolderImpl>> pendingCategorizationFolders private IDictionary<LLUUID, IList<InventoryFolderImpl>> pendingCategorizationFolders
= new Dictionary<LLUUID, IList<InventoryFolderImpl>>(); = new Dictionary<LLUUID, IList<InventoryFolderImpl>>();
private string m_inventoryHost
{
get
{
if (m_userProfile != null)
{
if (! String.IsNullOrEmpty(m_userProfile.UserAssetURI))
{
Uri uri = new Uri(m_userProfile.UserInventoryURI);
return uri.Host;
}
}
return "";
}
}
/// <summary> /// <summary>
/// Constructor /// Constructor
/// </summary> /// </summary>
@ -170,9 +152,9 @@ namespace OpenSim.Framework.Communications.Cache
{ {
foreach (InventoryFolderImpl folder in pendingCategorizationFolders[newFolder.ID]) foreach (InventoryFolderImpl folder in pendingCategorizationFolders[newFolder.ID])
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[INVENTORY CACHE]: Resolving pending received folder {0} {1} into {2} {3}", // "[INVENTORY CACHE]: Resolving pending received folder {0} {1} into {2} {3}",
// folder.name, folder.folderID, parent.name, parent.folderID); // folder.name, folder.folderID, parent.name, parent.folderID);
lock (newFolder.SubFolders) lock (newFolder.SubFolders)
{ {
@ -232,9 +214,9 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="folderInfo"></param> /// <param name="folderInfo"></param>
private void FolderReceive(InventoryFolderImpl newFolder) private void FolderReceive(InventoryFolderImpl newFolder)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[INVENTORY CACHE]: Received folder {0} {1} for user {2}", // "[INVENTORY CACHE]: Received folder {0} {1} for user {2}",
// folderInfo.Name, folderInfo.ID, userID); // folderInfo.Name, folderInfo.ID, userID);
if (RootFolder == null) if (RootFolder == null)
{ {
@ -285,9 +267,9 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="folderInfo"></param> /// <param name="folderInfo"></param>
private void ItemReceive(InventoryItemBase itemInfo) private void ItemReceive(InventoryItemBase itemInfo)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[INVENTORY CACHE]: Received item {0} {1} for user {2}", // "[INVENTORY CACHE]: Received item {0} {1} for user {2}",
// itemInfo.Name, itemInfo.ID, userID); // itemInfo.Name, itemInfo.ID, userID);
InventoryFolderImpl folder = RootFolder.FindFolder(itemInfo.Folder); InventoryFolderImpl folder = RootFolder.FindFolder(itemInfo.Folder);
if (null == folder) if (null == folder)
@ -315,8 +297,8 @@ namespace OpenSim.Framework.Communications.Cache
/// <returns></returns> /// <returns></returns>
public bool CreateFolder(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID) public bool CreateFolder(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId); // "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId);
if (HasInventory) if (HasInventory)
{ {
@ -343,15 +325,9 @@ namespace OpenSim.Framework.Communications.Cache
createdBaseFolder.Type = createdFolder.Type; createdBaseFolder.Type = createdFolder.Type;
createdBaseFolder.Version = createdFolder.Version; createdBaseFolder.Version = createdFolder.Version;
IInventoryServices invService = GetInventoryService(); m_commsManager.InventoryService.AddFolder(createdBaseFolder);
if (invService != null)
{
//m_commsManager.InventoryService
invService.AddFolder(createdBaseFolder);
return true;
}
return false; return true;
} }
else else
{ {
@ -390,8 +366,8 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="parentID"></param> /// <param name="parentID"></param>
public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID) public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
if (HasInventory) if (HasInventory)
{ {
@ -400,22 +376,17 @@ namespace OpenSim.Framework.Communications.Cache
baseFolder.ID = folderID; baseFolder.ID = folderID;
baseFolder.Name = name; baseFolder.Name = name;
baseFolder.ParentID = parentID; baseFolder.ParentID = parentID;
baseFolder.Type = (short) type; baseFolder.Type = (short)type;
baseFolder.Version = RootFolder.Version; baseFolder.Version = RootFolder.Version;
IInventoryServices invService = GetInventoryService(); m_commsManager.InventoryService.UpdateFolder(baseFolder);
if (invService != null)
{
//m_commsManager.InventoryService.
invService.UpdateFolder(baseFolder);
InventoryFolderImpl folder = RootFolder.FindFolder(folderID); InventoryFolderImpl folder = RootFolder.FindFolder(folderID);
if (folder != null) if (folder != null)
{ {
folder.Name = name; folder.Name = name;
folder.ParentID = parentID; folder.ParentID = parentID;
} }
}
} }
else else
{ {
@ -439,9 +410,9 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="parentID"></param> /// <param name="parentID"></param>
public bool MoveFolder(LLUUID folderID, LLUUID parentID) public bool MoveFolder(LLUUID folderID, LLUUID parentID)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[AGENT INVENTORY]: Moving inventory folder {0} into folder {1} for {2} {3}", // "[AGENT INVENTORY]: Moving inventory folder {0} into folder {1} for {2} {3}",
// parentID, remoteClient.Name, remoteClient.Name, remoteClient.AgentId); // parentID, remoteClient.Name, remoteClient.Name, remoteClient.AgentId);
if (HasInventory) if (HasInventory)
{ {
@ -450,24 +421,13 @@ namespace OpenSim.Framework.Communications.Cache
baseFolder.ID = folderID; baseFolder.ID = folderID;
baseFolder.ParentID = parentID; baseFolder.ParentID = parentID;
IInventoryServices invService = GetInventoryService(); m_commsManager.InventoryService.MoveFolder(baseFolder);
if (invService != null)
{
// m_commsManager.InventoryService
invService.MoveFolder(baseFolder);
InventoryFolderImpl folder = RootFolder.FindFolder(folderID); InventoryFolderImpl folder = RootFolder.FindFolder(folderID);
if (folder != null) if (folder != null)
{ folder.ParentID = parentID;
folder.ParentID = parentID;
}
return true; return true;
}
else
{
return false;
}
} }
else else
{ {
@ -490,8 +450,8 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="folderID"></param> /// <param name="folderID"></param>
public bool PurgeFolder(LLUUID folderID) public bool PurgeFolder(LLUUID folderID)
{ {
// m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}", // m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}",
// folderID, remoteClient.Name, remoteClient.AgentId); // folderID, remoteClient.Name, remoteClient.AgentId);
if (HasInventory) if (HasInventory)
{ {
@ -508,16 +468,11 @@ namespace OpenSim.Framework.Communications.Cache
purgedBaseFolder.Type = purgedFolder.Type; purgedBaseFolder.Type = purgedFolder.Type;
purgedBaseFolder.Version = purgedFolder.Version; purgedBaseFolder.Version = purgedFolder.Version;
IInventoryServices invService = GetInventoryService(); m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder);
if (invService != null)
{
//m_commsManager.InventoryService
invService.PurgeFolder(purgedBaseFolder);
purgedFolder.Purge(); purgedFolder.Purge();
return true; return true;
}
} }
} }
else else
@ -543,20 +498,14 @@ namespace OpenSim.Framework.Communications.Cache
{ {
if (item.Folder == LLUUID.Zero) if (item.Folder == LLUUID.Zero)
{ {
InventoryFolderImpl f=FindFolderForType(item.AssetType); InventoryFolderImpl f = FindFolderForType(item.AssetType);
if (f != null) if (f != null)
item.Folder=f.ID; item.Folder = f.ID;
else else
item.Folder=RootFolder.ID; item.Folder = RootFolder.ID;
} }
ItemReceive(item); ItemReceive(item);
m_commsManager.InventoryService.AddItem(item);
IInventoryServices invService = GetInventoryService();
if (invService != null)
{
//m_commsManager.InventoryService
invService.AddItem(item);
}
} }
else else
{ {
@ -576,12 +525,7 @@ namespace OpenSim.Framework.Communications.Cache
{ {
if (HasInventory) if (HasInventory)
{ {
IInventoryServices invService = GetInventoryService(); m_commsManager.InventoryService.UpdateItem(item);
if (invService != null)
{
//m_commsManager.InventoryService
invService.UpdateItem(item);
}
} }
else else
{ {
@ -620,14 +564,7 @@ namespace OpenSim.Framework.Communications.Cache
if (RootFolder.DeleteItem(item.ID)) if (RootFolder.DeleteItem(item.ID))
{ {
IInventoryServices invService = GetInventoryService(); return m_commsManager.InventoryService.DeleteItem(item);
if (invService != null)
{
//return m_commsManager.InventoryService
return invService.DeleteItem(item);
}
return false;
} }
} }
else else
@ -659,9 +596,9 @@ namespace OpenSim.Framework.Communications.Cache
if ((folder = RootFolder.FindFolder(folderID)) != null) if ((folder = RootFolder.FindFolder(folderID)) != null)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[AGENT INVENTORY]: Found folder {0} for client {1}", // "[AGENT INVENTORY]: Found folder {0} for client {1}",
// folderID, remoteClient.AgentId); // folderID, remoteClient.AgentId);
client.SendInventoryFolderDetails( client.SendInventoryFolderDetails(
client.AgentId, folderID, folder.RequestListOfItems(), client.AgentId, folderID, folder.RequestListOfItems(),
@ -704,13 +641,6 @@ namespace OpenSim.Framework.Communications.Cache
} }
return null; return null;
} }
public IInventoryServices GetInventoryService()
{
IInventoryServices invService;
m_commsManager.TryGetInventoryService(m_inventoryHost, out invService);
return invService;
}
} }
/// <summary> /// <summary>

View File

@ -119,12 +119,12 @@ namespace OpenSim.Framework.Communications.Cache
CachedUserInfo userInfo = GetUserDetails(userID); CachedUserInfo userInfo = GetUserDetails(userID);
if (userInfo != null) if (userInfo != null)
{ {
//m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive); m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive);
IInventoryServices invService = userInfo.GetInventoryService(); //IInventoryServices invService = userInfo.GetInventoryService();
if (invService != null) //if (invService != null)
{ //{
invService.RequestInventoryForUser(userID, userInfo.InventoryReceive); // invService.RequestInventoryForUser(userID, userInfo.InventoryReceive);
} //}
} }
else else
{ {

View File

@ -231,10 +231,10 @@ namespace OpenSim.Framework.Communications
try try
{ {
string inventoryServerUrl = ""; string inventoryServerUrl = "";
if (!String.IsNullOrEmpty(userProfile.UserInventoryURI)) //if (!String.IsNullOrEmpty(userProfile.UserInventoryURI))
{ //{
inventoryServerUrl = userProfile.UserInventoryURI; // inventoryServerUrl = userProfile.UserInventoryURI;
} //}
inventData = GetInventorySkeleton(agentID, inventoryServerUrl); inventData = GetInventorySkeleton(agentID, inventoryServerUrl);
} }
catch (Exception e) catch (Exception e)
@ -393,10 +393,10 @@ namespace OpenSim.Framework.Communications
// Inventory Library Section // Inventory Library Section
string inventoryServerUrl = ""; string inventoryServerUrl = "";
if (!String.IsNullOrEmpty(userProfile.UserInventoryURI)) //if (!String.IsNullOrEmpty(userProfile.UserInventoryURI))
{ //{
inventoryServerUrl = userProfile.UserInventoryURI; // inventoryServerUrl = userProfile.UserInventoryURI;
} //}
InventoryData inventData = GetInventorySkeleton(agentID, inventoryServerUrl); InventoryData inventData = GetInventorySkeleton(agentID, inventoryServerUrl);
ArrayList AgentInventoryArray = inventData.InventoryArray; ArrayList AgentInventoryArray = inventData.InventoryArray;

View File

@ -422,10 +422,10 @@ namespace OpenSim.Grid.UserServer
protected override InventoryData GetInventorySkeleton(LLUUID userID, string serverUrl) protected override InventoryData GetInventorySkeleton(LLUUID userID, string serverUrl)
{ {
string invUrl = m_config.InventoryUrl; string invUrl = m_config.InventoryUrl;
if (!String.IsNullOrEmpty(serverUrl)) //if (!String.IsNullOrEmpty(serverUrl))
{ //{
invUrl = serverUrl+"/"; // invUrl = serverUrl+"/";
} //}
m_log.DebugFormat( m_log.DebugFormat(
"[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}",