diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 29a9e149de..acae4b12fa 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -142,6 +142,7 @@ namespace OpenSim.Framework.Communications.Cache if (userProfile != null) { + if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null) userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null) @@ -177,6 +178,7 @@ namespace OpenSim.Framework.Communications.Cache UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(userID); if (userProfile != null) { + if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null) userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index f073f32ee7..1fdf1ef50a 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs @@ -56,6 +56,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory private ISessionAuthInventoryService m_HGService; private string m_LocalGridInventoryURI = string.Empty; + + private string LocalGridInventory + { + get + { + if (m_LocalGridInventoryURI == null || m_LocalGridInventoryURI == "") + m_LocalGridInventoryURI = m_Scene.CommsManager.NetworkServersInfo.InventoryURL; + return m_LocalGridInventoryURI; + } + } + public Type ReplaceableInterface { get { return null; } @@ -533,7 +544,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory string userInventoryServerURI = Util.ServerURI(uinfo.UserProfile.UserInventoryURI); - string uri = m_LocalGridInventoryURI.TrimEnd('/'); + string uri = LocalGridInventory.TrimEnd('/'); if ((userInventoryServerURI == uri) || (userInventoryServerURI == "")) { @@ -545,7 +556,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory private string GetUserInventoryURI(UUID userID) { - string invURI = m_LocalGridInventoryURI; + string invURI = LocalGridInventory; CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID); if ((uinfo == null) || (uinfo.UserProfile == null))