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
remove-scene-viewer
Justin Clark-Casey (justincc) 2011-09-06 23:16:37 +01:00
parent e6cd4defdb
commit d7a516d885
3 changed files with 33 additions and 19 deletions

View File

@ -87,8 +87,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
"Show the bindings between user UUIDs and user names", "Show the bindings between user UUIDs and user names",
String.Empty, String.Empty,
HandleShowUsers); HandleShowUsers);
} }
public bool IsSharedModule public bool IsSharedModule

View File

@ -64,7 +64,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
get get
{ {
if (m_UserManagement == null) if (m_UserManagement == null)
{
m_UserManagement = m_Scenes[0].RequestModuleInterface<IUserManagement>(); m_UserManagement = m_Scenes[0].RequestModuleInterface<IUserManagement>();
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; return m_UserManagement;
} }
} }
@ -323,7 +331,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
} }
public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
{ {
//m_log.Debug("[HG INVENTORY CONNECTOR]: GetFolderItems " + 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) if (folder == null)
return false; return false;
@ -355,7 +363,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return connector.AddFolder(folder); return connector.AddFolder(folder);
} }
public bool UpdateFolder(InventoryFolderBase folder) public bool UpdateFolder(InventoryFolderBase folder)
{ {
if (folder == null) if (folder == null)
return false; return false;
@ -372,7 +380,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return connector.UpdateFolder(folder); return connector.UpdateFolder(folder);
} }
public bool DeleteFolders(UUID ownerID, List<UUID> folderIDs) public bool DeleteFolders(UUID ownerID, List<UUID> folderIDs)
{ {
if (folderIDs == null) if (folderIDs == null)
return false; return false;
@ -391,7 +399,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return connector.DeleteFolders(ownerID, folderIDs); return connector.DeleteFolders(ownerID, folderIDs);
} }
public bool MoveFolder(InventoryFolderBase folder) public bool MoveFolder(InventoryFolderBase folder)
{ {
if (folder == null) if (folder == null)
return false; return false;
@ -408,7 +416,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return connector.MoveFolder(folder); return connector.MoveFolder(folder);
} }
public bool PurgeFolder(InventoryFolderBase folder) public bool PurgeFolder(InventoryFolderBase folder)
{ {
if (folder == null) if (folder == null)
return false; return false;
@ -442,7 +450,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return connector.AddItem(item); return connector.AddItem(item);
} }
public bool UpdateItem(InventoryItemBase item) public bool UpdateItem(InventoryItemBase item)
{ {
if (item == null) if (item == null)
return false; return false;
@ -459,7 +467,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return connector.UpdateItem(item); return connector.UpdateItem(item);
} }
public bool MoveItems(UUID ownerID, List<InventoryItemBase> items) public bool MoveItems(UUID ownerID, List<InventoryItemBase> items)
{ {
if (items == null) if (items == null)
return false; return false;
@ -478,7 +486,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return connector.MoveItems(ownerID, items); return connector.MoveItems(ownerID, items);
} }
public bool DeleteItems(UUID ownerID, List<UUID> itemIDs) public bool DeleteItems(UUID ownerID, List<UUID> itemIDs)
{ {
//m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Delete {0} items for user {1}", itemIDs.Count, ownerID); //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); return connector.DeleteItems(ownerID, itemIDs);
} }
public InventoryItemBase GetItem(InventoryItemBase item) public InventoryItemBase GetItem(InventoryItemBase item)
{ {
if (item == null) if (item == null)
return null; return null;
@ -513,7 +521,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return connector.GetItem(item); return connector.GetItem(item);
} }
public InventoryFolderBase GetFolder(InventoryFolderBase folder) public InventoryFolderBase GetFolder(InventoryFolderBase folder)
{ {
if (folder == null) if (folder == null)
return null; return null;
@ -530,17 +538,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return connector.GetFolder(folder); return connector.GetFolder(folder);
} }
public bool HasInventoryForUser(UUID userID) public bool HasInventoryForUser(UUID userID)
{ {
return false; return false;
} }
public List<InventoryItemBase> GetActiveGestures(UUID userId) public List<InventoryItemBase> GetActiveGestures(UUID userId)
{ {
return new List<InventoryItemBase>(); return new List<InventoryItemBase>();
} }
public int GetAssetPermissions(UUID userID, UUID assetID) public int GetAssetPermissions(UUID userID, UUID assetID)
{ {
//m_log.Debug("[HG INVENTORY CONNECTOR]: GetAssetPermissions " + assetID); //m_log.Debug("[HG INVENTORY CONNECTOR]: GetAssetPermissions " + assetID);

View File

@ -57,12 +57,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
if (m_UserManager == null) if (m_UserManager == null)
{ {
m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>(); m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>();
if (m_UserManager == null)
m_log.ErrorFormat(
"[XINVENTORY CONNECTOR]: Could not retrieve IUserManagement module from {0}",
m_Scene.RegionInfo.RegionName);
} }
return m_UserManager; return m_UserManager;
} }
set set
{ {
m_log.WarnFormat(
"[XINVENTORY CONNECTOR]: Manually setting UserManager {0} (scene {1})", value, m_Scene);
m_UserManager = value; m_UserManager = value;
} }
} }
@ -91,12 +100,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
Init(source); Init(source);
} }
protected void Init(IConfigSource source) protected void Init(IConfigSource source)
{ {
m_RemoteConnector = new XInventoryServicesConnector(source); m_RemoteConnector = new XInventoryServicesConnector(source);
} }
#region ISharedRegionModule #region ISharedRegionModule
public void Initialise(IConfigSource source) public void Initialise(IConfigSource source)
@ -186,7 +194,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return m_RemoteConnector.GetFolderForType(userID, type); 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); InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID, folderID);
Util.FireAndForget(delegate Util.FireAndForget(delegate