From 8bdd80abfa3830142b16615d97d555dad417e08d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 12 Jan 2012 09:56:35 -0800 Subject: HG: normalize all externalized user ULRs to be the Home URL, i.e. the location of the user's UAS. This corrects an earlier design which had some cases pointing to the profile server. WARNING: CONFIGURATION CHANGES in both the sims (*Common.ini) and the Robust configs (Robust.HG.ini). Please check diff of the example files, but basically all vars that were pointing to profile should point to the UAS instead and should be called HomeURI. --- OpenSim/Services/HypergridService/HGAssetService.cs | 11 +++++++---- OpenSim/Services/HypergridService/HGInventoryService.cs | 9 ++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'OpenSim/Services/HypergridService') diff --git a/OpenSim/Services/HypergridService/HGAssetService.cs b/OpenSim/Services/HypergridService/HGAssetService.cs index e518329..22e233a 100644 --- a/OpenSim/Services/HypergridService/HGAssetService.cs +++ b/OpenSim/Services/HypergridService/HGAssetService.cs @@ -53,7 +53,7 @@ namespace OpenSim.Services.HypergridService LogManager.GetLogger( MethodBase.GetCurrentMethod().DeclaringType); - private string m_ProfileServiceURL; + private string m_HomeURL; private IUserAccountService m_UserAccountService; private UserAccountCache m_Cache; @@ -74,7 +74,10 @@ namespace OpenSim.Services.HypergridService if (m_UserAccountService == null) throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); - m_ProfileServiceURL = assetConfig.GetString("ProfileServerURI", string.Empty); + // legacy configuration [obsolete] + m_HomeURL = assetConfig.GetString("ProfileServerURI", string.Empty); + // Preferred + m_HomeURL = assetConfig.GetString("HomeURI", m_HomeURL); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); } @@ -134,13 +137,13 @@ namespace OpenSim.Services.HypergridService UserAccount creator = m_Cache.GetUser(meta.CreatorID); if (creator != null) - meta.CreatorID = m_ProfileServiceURL + "/" + meta.CreatorID + ";" + creator.FirstName + " " + creator.LastName; + meta.CreatorID = meta.CreatorID + ";" + m_HomeURL + "/" + creator.FirstName + " " + creator.LastName; } protected byte[] AdjustIdentifiers(byte[] data) { string xml = Utils.BytesToString(data); - return Utils.StringToBytes(ExternalRepresentationUtils.RewriteSOP(xml, m_ProfileServiceURL, m_Cache, UUID.Zero)); + return Utils.StringToBytes(ExternalRepresentationUtils.RewriteSOP(xml, m_HomeURL, m_Cache, UUID.Zero)); } } diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs index 4eb61ba..daf8c3a 100644 --- a/OpenSim/Services/HypergridService/HGInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGInventoryService.cs @@ -55,7 +55,7 @@ namespace OpenSim.Services.HypergridService protected new IXInventoryData m_Database; - private string m_ProfileServiceURL; + private string m_HomeURL; private IUserAccountService m_UserAccountService; private UserAccountCache m_Cache; @@ -100,7 +100,10 @@ namespace OpenSim.Services.HypergridService if (m_UserAccountService == null) throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); - m_ProfileServiceURL = invConfig.GetString("ProfileServerURI", string.Empty); + // legacy configuration [obsolete] + m_HomeURL = invConfig.GetString("ProfileServerURI", string.Empty); + // Preferred + m_HomeURL = invConfig.GetString("HomeURI", m_HomeURL); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); } @@ -321,7 +324,7 @@ namespace OpenSim.Services.HypergridService // Adjust the creator data if (user != null && it != null && (it.CreatorData == null || it.CreatorData == string.Empty)) - it.CreatorData = m_ProfileServiceURL + "/" + it.CreatorId + ";" + user.FirstName + " " + user.LastName; + it.CreatorData = m_HomeURL + ";" + user.FirstName + " " + user.LastName; return it; } -- cgit v1.1