aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/HypergridService
diff options
context:
space:
mode:
authorDiva Canto2012-01-12 09:56:35 -0800
committerDiva Canto2012-01-12 09:56:35 -0800
commit8bdd80abfa3830142b16615d97d555dad417e08d (patch)
treebfeb815776a50535591d2bacd20082c6e7f8caa9 /OpenSim/Services/HypergridService
parentCorrecting ini.example were permissionmodules uses komma instead of space as ... (diff)
downloadopensim-SC_OLD-8bdd80abfa3830142b16615d97d555dad417e08d.zip
opensim-SC_OLD-8bdd80abfa3830142b16615d97d555dad417e08d.tar.gz
opensim-SC_OLD-8bdd80abfa3830142b16615d97d555dad417e08d.tar.bz2
opensim-SC_OLD-8bdd80abfa3830142b16615d97d555dad417e08d.tar.xz
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.
Diffstat (limited to 'OpenSim/Services/HypergridService')
-rw-r--r--OpenSim/Services/HypergridService/HGAssetService.cs11
-rw-r--r--OpenSim/Services/HypergridService/HGInventoryService.cs9
2 files changed, 13 insertions, 7 deletions
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
53 LogManager.GetLogger( 53 LogManager.GetLogger(
54 MethodBase.GetCurrentMethod().DeclaringType); 54 MethodBase.GetCurrentMethod().DeclaringType);
55 55
56 private string m_ProfileServiceURL; 56 private string m_HomeURL;
57 private IUserAccountService m_UserAccountService; 57 private IUserAccountService m_UserAccountService;
58 58
59 private UserAccountCache m_Cache; 59 private UserAccountCache m_Cache;
@@ -74,7 +74,10 @@ namespace OpenSim.Services.HypergridService
74 if (m_UserAccountService == null) 74 if (m_UserAccountService == null)
75 throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); 75 throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll));
76 76
77 m_ProfileServiceURL = assetConfig.GetString("ProfileServerURI", string.Empty); 77 // legacy configuration [obsolete]
78 m_HomeURL = assetConfig.GetString("ProfileServerURI", string.Empty);
79 // Preferred
80 m_HomeURL = assetConfig.GetString("HomeURI", m_HomeURL);
78 81
79 m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); 82 m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
80 } 83 }
@@ -134,13 +137,13 @@ namespace OpenSim.Services.HypergridService
134 137
135 UserAccount creator = m_Cache.GetUser(meta.CreatorID); 138 UserAccount creator = m_Cache.GetUser(meta.CreatorID);
136 if (creator != null) 139 if (creator != null)
137 meta.CreatorID = m_ProfileServiceURL + "/" + meta.CreatorID + ";" + creator.FirstName + " " + creator.LastName; 140 meta.CreatorID = meta.CreatorID + ";" + m_HomeURL + "/" + creator.FirstName + " " + creator.LastName;
138 } 141 }
139 142
140 protected byte[] AdjustIdentifiers(byte[] data) 143 protected byte[] AdjustIdentifiers(byte[] data)
141 { 144 {
142 string xml = Utils.BytesToString(data); 145 string xml = Utils.BytesToString(data);
143 return Utils.StringToBytes(ExternalRepresentationUtils.RewriteSOP(xml, m_ProfileServiceURL, m_Cache, UUID.Zero)); 146 return Utils.StringToBytes(ExternalRepresentationUtils.RewriteSOP(xml, m_HomeURL, m_Cache, UUID.Zero));
144 } 147 }
145 148
146 } 149 }
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
55 55
56 protected new IXInventoryData m_Database; 56 protected new IXInventoryData m_Database;
57 57
58 private string m_ProfileServiceURL; 58 private string m_HomeURL;
59 private IUserAccountService m_UserAccountService; 59 private IUserAccountService m_UserAccountService;
60 60
61 private UserAccountCache m_Cache; 61 private UserAccountCache m_Cache;
@@ -100,7 +100,10 @@ namespace OpenSim.Services.HypergridService
100 if (m_UserAccountService == null) 100 if (m_UserAccountService == null)
101 throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); 101 throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll));
102 102
103 m_ProfileServiceURL = invConfig.GetString("ProfileServerURI", string.Empty); 103 // legacy configuration [obsolete]
104 m_HomeURL = invConfig.GetString("ProfileServerURI", string.Empty);
105 // Preferred
106 m_HomeURL = invConfig.GetString("HomeURI", m_HomeURL);
104 107
105 m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); 108 m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
106 } 109 }
@@ -321,7 +324,7 @@ namespace OpenSim.Services.HypergridService
321 324
322 // Adjust the creator data 325 // Adjust the creator data
323 if (user != null && it != null && (it.CreatorData == null || it.CreatorData == string.Empty)) 326 if (user != null && it != null && (it.CreatorData == null || it.CreatorData == string.Empty))
324 it.CreatorData = m_ProfileServiceURL + "/" + it.CreatorId + ";" + user.FirstName + " " + user.LastName; 327 it.CreatorData = m_HomeURL + ";" + user.FirstName + " " + user.LastName;
325 328
326 return it; 329 return it;
327 } 330 }