Changed the way to get to the profile service. Changed GetSystemsFolder in HGBroker.
parent
c56e51a6e3
commit
bb513c1d88
|
@ -238,7 +238,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||||
public override Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID)
|
public override Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID)
|
||||||
{
|
{
|
||||||
if (IsLocalGridUser(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
|
else
|
||||||
{
|
{
|
||||||
UUID sessionID = GetSessionID(userID);
|
UUID sessionID = GetSessionID(userID);
|
||||||
|
@ -464,7 +476,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||||
CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID);
|
CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID);
|
||||||
if (uinfo == null)
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||||
private bool m_Enabled = false;
|
private bool m_Enabled = false;
|
||||||
private bool m_Initialized = false;
|
private bool m_Initialized = false;
|
||||||
private Scene m_Scene;
|
private Scene m_Scene;
|
||||||
|
private UserProfileCacheService m_UserProfileService;
|
||||||
private InventoryServicesConnector m_RemoteConnector;
|
private InventoryServicesConnector m_RemoteConnector;
|
||||||
|
|
||||||
public Type ReplaceableInterface
|
public Type ReplaceableInterface
|
||||||
|
@ -105,8 +106,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||||
|
|
||||||
public void AddRegion(Scene scene)
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
m_log.Debug("[XXXX] Adding scene " + scene.RegionInfo.RegionName);
|
|
||||||
m_Scene = scene;
|
m_Scene = scene;
|
||||||
|
m_log.Debug("[XXXX] Adding scene " + m_Scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
if (!m_Enabled)
|
if (!m_Enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -133,6 +134,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||||
|
|
||||||
public void RegionLoaded(Scene scene)
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
|
m_UserProfileService = m_Scene.CommsManager.UserProfileCacheService;
|
||||||
if (!m_Enabled)
|
if (!m_Enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -318,10 +320,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||||
if (m_Scene == null)
|
if (m_Scene == null)
|
||||||
m_log.Debug("[INVENTORY CONNECTOR]: OOPS! scene is 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");
|
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)
|
if (uinfo != null)
|
||||||
return uinfo.SessionID;
|
return uinfo.SessionID;
|
||||||
m_log.DebugFormat("[INVENTORY CONNECTOR]: user profile for {0} not found", userID);
|
m_log.DebugFormat("[INVENTORY CONNECTOR]: user profile for {0} not found", userID);
|
||||||
|
|
Loading…
Reference in New Issue