aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJohn Hurliman2010-09-07 13:43:36 -0700
committerJohn Hurliman2010-09-07 13:43:36 -0700
commit029c9548040e0206640f41151f4a4643540bfeff (patch)
treef41e8f8f1158d70d437437fb30d1e58667a4829c /OpenSim
parentSimianUserAccountServiceConnector was not initializing the user cache (diff)
downloadopensim-SC_OLD-029c9548040e0206640f41151f4a4643540bfeff.zip
opensim-SC_OLD-029c9548040e0206640f41151f4a4643540bfeff.tar.gz
opensim-SC_OLD-029c9548040e0206640f41151f4a4643540bfeff.tar.bz2
opensim-SC_OLD-029c9548040e0206640f41151f4a4643540bfeff.tar.xz
* Added sanity checks to the SimianAssetServiceConnector so it will throw a sensible error message when it is misconfigured instead of a mysterious "Uri is empty" error
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index 99e6983..caeabb7 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -116,6 +116,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
116 116
117 public AssetBase Get(string id) 117 public AssetBase Get(string id)
118 { 118 {
119 if (String.IsNullOrEmpty(m_serverUrl))
120 {
121 m_log.Error("[SIMIAN ASSET CONNECTOR]: No AssetServerURI configured");
122 throw new InvalidOperationException();
123 }
124
119 // Cache fetch 125 // Cache fetch
120 if (m_cache != null) 126 if (m_cache != null)
121 { 127 {
@@ -142,6 +148,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
142 /// <returns></returns> 148 /// <returns></returns>
143 public AssetMetadata GetMetadata(string id) 149 public AssetMetadata GetMetadata(string id)
144 { 150 {
151 if (String.IsNullOrEmpty(m_serverUrl))
152 {
153 m_log.Error("[SIMIAN ASSET CONNECTOR]: No AssetServerURI configured");
154 throw new InvalidOperationException();
155 }
156
145 AssetMetadata metadata = null; 157 AssetMetadata metadata = null;
146 158
147 // Cache fetch 159 // Cache fetch
@@ -213,6 +225,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
213 /// <returns>True if the id was parseable, false otherwise</returns> 225 /// <returns>True if the id was parseable, false otherwise</returns>
214 public bool Get(string id, Object sender, AssetRetrieved handler) 226 public bool Get(string id, Object sender, AssetRetrieved handler)
215 { 227 {
228 if (String.IsNullOrEmpty(m_serverUrl))
229 {
230 m_log.Error("[SIMIAN ASSET CONNECTOR]: No AssetServerURI configured");
231 throw new InvalidOperationException();
232 }
233
216 // Cache fetch 234 // Cache fetch
217 if (m_cache != null) 235 if (m_cache != null)
218 { 236 {
@@ -243,6 +261,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
243 /// <returns></returns> 261 /// <returns></returns>
244 public string Store(AssetBase asset) 262 public string Store(AssetBase asset)
245 { 263 {
264 if (String.IsNullOrEmpty(m_serverUrl))
265 {
266 m_log.Error("[SIMIAN ASSET CONNECTOR]: No AssetServerURI configured");
267 throw new InvalidOperationException();
268 }
269
246 bool storedInCache = false; 270 bool storedInCache = false;
247 string errorMessage = null; 271 string errorMessage = null;
248 272
@@ -375,6 +399,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
375 /// <returns></returns> 399 /// <returns></returns>
376 public bool Delete(string id) 400 public bool Delete(string id)
377 { 401 {
402 if (String.IsNullOrEmpty(m_serverUrl))
403 {
404 m_log.Error("[SIMIAN ASSET CONNECTOR]: No AssetServerURI configured");
405 throw new InvalidOperationException();
406 }
407
378 //string errorMessage = String.Empty; 408 //string errorMessage = String.Empty;
379 string url = m_serverUrl + id; 409 string url = m_serverUrl + id;
380 410