aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs23
1 files changed, 11 insertions, 12 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
index 32415e9..910c0d7 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
@@ -221,7 +221,7 @@ namespace OpenSim.Services.Connectors
221 AsynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, 221 AsynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0,
222 delegate(AssetBase a) 222 delegate(AssetBase a)
223 { 223 {
224 if (m_Cache != null) 224 if (a != null && m_Cache != null)
225 m_Cache.Cache(a); 225 m_Cache.Cache(a);
226 226
227 AssetRetrievedEx handlers; 227 AssetRetrievedEx handlers;
@@ -287,7 +287,7 @@ namespace OpenSim.Services.Connectors
287 287
288 string uri = m_ServerURI + "/assets/"; 288 string uri = m_ServerURI + "/assets/";
289 289
290 string newID = string.Empty; 290 string newID;
291 try 291 try
292 { 292 {
293 newID = SynchronousRestObjectRequester. 293 newID = SynchronousRestObjectRequester.
@@ -295,19 +295,18 @@ namespace OpenSim.Services.Connectors
295 } 295 }
296 catch (Exception e) 296 catch (Exception e)
297 { 297 {
298 m_log.WarnFormat("[ASSET CONNECTOR]: Unable to send asset {0} to asset server. Reason: {1}", asset.ID, e.Message); 298 m_log.Warn(string.Format("[ASSET CONNECTOR]: Unable to send asset {0} to asset server. Reason: {1} ", asset.ID, e.Message), e);
299 return string.Empty;
299 } 300 }
300 301
301 if (newID != String.Empty) 302 if (string.IsNullOrEmpty(newID))
302 { 303 return string.Empty;
303 // Placing this here, so that this work with old asset servers that don't send any reply back 304
304 // SynchronousRestObjectRequester returns somethins that is not an empty string 305 asset.ID = newID;
305 if (newID != null) 306
306 asset.ID = newID; 307 if (m_Cache != null)
308 m_Cache.Cache(asset);
307 309
308 if (m_Cache != null)
309 m_Cache.Cache(asset);
310 }
311 return newID; 310 return newID;
312 } 311 }
313 312