diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index cb9a462eb1..59b20190ba 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs @@ -238,7 +238,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory public override Dictionary GetSystemFolders(UUID userID) { if (IsLocalGridUser(userID)) - return GetSystemFoldersLocal(userID); + { + // This is not pretty, but it will have to do for now + if (m_GridService is BaseInventoryConnector) + { + m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetSystemsFolders redirected to RemoteInventoryServiceConnector module"); + return ((BaseInventoryConnector)m_GridService).GetSystemFolders(userID); + } + else + { + m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetSystemsFolders redirected to GetSystemFoldersLocal"); + return GetSystemFoldersLocal(userID); + } + } else { UUID sessionID = GetSessionID(userID); @@ -464,7 +476,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID); if (uinfo == null) { - m_log.DebugFormat("[HG INVENTORY CONNECTOR]: IsLocalGridUser, no profile for user {0}. Returning false.", userID); + m_log.DebugFormat("[HG INVENTORY CONNECTOR]: IsLocalGridUser, no profile for user {0}. Returning true.", userID); return true; } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs index 20cddcd131..62df3bd43f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs @@ -49,6 +49,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory private bool m_Enabled = false; private bool m_Initialized = false; private Scene m_Scene; + private UserProfileCacheService m_UserProfileService; private InventoryServicesConnector m_RemoteConnector; public Type ReplaceableInterface @@ -105,8 +106,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory public void AddRegion(Scene scene) { - m_log.Debug("[XXXX] Adding scene " + scene.RegionInfo.RegionName); m_Scene = scene; + m_log.Debug("[XXXX] Adding scene " + m_Scene.RegionInfo.RegionName); if (!m_Enabled) return; @@ -133,6 +134,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory public void RegionLoaded(Scene scene) { + m_UserProfileService = m_Scene.CommsManager.UserProfileCacheService; if (!m_Enabled) return; @@ -318,10 +320,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory if (m_Scene == null) m_log.Debug("[INVENTORY CONNECTOR]: OOPS! scene is null"); - if (m_Scene.CommsManager.UserProfileCacheService == null) + if (m_UserProfileService == null) m_log.Debug("[INVENTORY CONNECTOR]: OOPS! UserProfileCacheService is null"); - CachedUserInfo uinfo = m_Scene.CommsManager.UserProfileCacheService.GetUserDetails(userID); + CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID); if (uinfo != null) return uinfo.SessionID; m_log.DebugFormat("[INVENTORY CONNECTOR]: user profile for {0} not found", userID);