From d7a516d885b9b39fe70e4e7a8645ebbd1671b110 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 6 Sep 2011 23:16:37 +0100 Subject: Add temporary debugging in HGInventoryBroker and RemoveXInventoryServiceConnector This is for http://opensimulator.org/mantis/view.php?id=5669 If we can't retrieve an IUserManagement module we complain, and we also warn in the log when its manually set in XISC by HGInventoryBroker --- .../UserManagement/UserManagementModule.cs | 2 -- .../Inventory/HGInventoryBroker.cs | 36 +++++++++++++--------- .../Inventory/RemoteXInventoryServiceConnector.cs | 14 +++++++-- 3 files changed, 33 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index b0b35e4..f7003db 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -87,8 +87,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement "Show the bindings between user UUIDs and user names", String.Empty, HandleShowUsers); - - } public bool IsSharedModule diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index f9e4bb9..d9d7318 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs @@ -64,7 +64,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory get { if (m_UserManagement == null) + { m_UserManagement = m_Scenes[0].RequestModuleInterface(); + + if (m_UserManagement == null) + m_log.ErrorFormat( + "[HG INVENTORY CONNECTOR]: Could not retrieve IUserManagement module from {0}", + m_Scenes[0].RegionInfo.RegionName); + } + return m_UserManagement; } } @@ -323,7 +331,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory } - public List GetFolderItems(UUID userID, UUID folderID) + public List GetFolderItems(UUID userID, UUID folderID) { //m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolderItems " + folderID); @@ -338,7 +346,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory } - public bool AddFolder(InventoryFolderBase folder) + public bool AddFolder(InventoryFolderBase folder) { if (folder == null) return false; @@ -355,7 +363,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.AddFolder(folder); } - public bool UpdateFolder(InventoryFolderBase folder) + public bool UpdateFolder(InventoryFolderBase folder) { if (folder == null) return false; @@ -372,7 +380,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.UpdateFolder(folder); } - public bool DeleteFolders(UUID ownerID, List folderIDs) + public bool DeleteFolders(UUID ownerID, List folderIDs) { if (folderIDs == null) return false; @@ -391,7 +399,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.DeleteFolders(ownerID, folderIDs); } - public bool MoveFolder(InventoryFolderBase folder) + public bool MoveFolder(InventoryFolderBase folder) { if (folder == null) return false; @@ -408,7 +416,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.MoveFolder(folder); } - public bool PurgeFolder(InventoryFolderBase folder) + public bool PurgeFolder(InventoryFolderBase folder) { if (folder == null) return false; @@ -442,7 +450,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.AddItem(item); } - public bool UpdateItem(InventoryItemBase item) + public bool UpdateItem(InventoryItemBase item) { if (item == null) return false; @@ -459,7 +467,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.UpdateItem(item); } - public bool MoveItems(UUID ownerID, List items) + public bool MoveItems(UUID ownerID, List items) { if (items == null) return false; @@ -478,7 +486,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.MoveItems(ownerID, items); } - public bool DeleteItems(UUID ownerID, List itemIDs) + public bool DeleteItems(UUID ownerID, List itemIDs) { //m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Delete {0} items for user {1}", itemIDs.Count, ownerID); @@ -497,7 +505,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.DeleteItems(ownerID, itemIDs); } - public InventoryItemBase GetItem(InventoryItemBase item) + public InventoryItemBase GetItem(InventoryItemBase item) { if (item == null) return null; @@ -513,7 +521,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.GetItem(item); } - public InventoryFolderBase GetFolder(InventoryFolderBase folder) + public InventoryFolderBase GetFolder(InventoryFolderBase folder) { if (folder == null) return null; @@ -530,17 +538,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.GetFolder(folder); } - public bool HasInventoryForUser(UUID userID) + public bool HasInventoryForUser(UUID userID) { return false; } - public List GetActiveGestures(UUID userId) + public List GetActiveGestures(UUID userId) { return new List(); } - public int GetAssetPermissions(UUID userID, UUID assetID) + public int GetAssetPermissions(UUID userID, UUID assetID) { //m_log.Debug("[HG INVENTORY CONNECTOR]: GetAssetPermissions " + assetID); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index 4a3ccc5..97fdd4e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs @@ -57,12 +57,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory if (m_UserManager == null) { m_UserManager = m_Scene.RequestModuleInterface(); + + if (m_UserManager == null) + m_log.ErrorFormat( + "[XINVENTORY CONNECTOR]: Could not retrieve IUserManagement module from {0}", + m_Scene.RegionInfo.RegionName); } + return m_UserManager; } set { + m_log.WarnFormat( + "[XINVENTORY CONNECTOR]: Manually setting UserManager {0} (scene {1})", value, m_Scene); + m_UserManager = value; } } @@ -91,12 +100,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory Init(source); } - protected void Init(IConfigSource source) + protected void Init(IConfigSource source) { m_RemoteConnector = new XInventoryServicesConnector(source); } - #region ISharedRegionModule public void Initialise(IConfigSource source) @@ -186,7 +194,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return m_RemoteConnector.GetFolderForType(userID, type); } - public InventoryCollection GetFolderContent(UUID userID, UUID folderID) + public InventoryCollection GetFolderContent(UUID userID, UUID folderID) { InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID, folderID); Util.FireAndForget(delegate -- cgit v1.1