diff options
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 531939f..121e863 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | |||
@@ -77,7 +77,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
77 | public string Name { get { return "SimianAssetServiceConnector"; } } | 77 | public string Name { get { return "SimianAssetServiceConnector"; } } |
78 | public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAssetService>(this); } } | 78 | public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface<IAssetService>(this); } } |
79 | public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAssetService>(this); } } | 79 | public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface<IAssetService>(this); } } |
80 | 80 | ||
81 | #endregion ISharedRegionModule | 81 | #endregion ISharedRegionModule |
82 | 82 | ||
83 | public SimianAssetServiceConnector(IConfigSource source) | 83 | public SimianAssetServiceConnector(IConfigSource source) |
@@ -143,7 +143,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
143 | 143 | ||
144 | return SimianGetOperation(id); | 144 | return SimianGetOperation(id); |
145 | } | 145 | } |
146 | 146 | ||
147 | 147 | ||
148 | public AssetBase GetCached(string id) | 148 | public AssetBase GetCached(string id) |
149 | { | 149 | { |
@@ -177,7 +177,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
177 | // return GetRemoteMetadata(id); | 177 | // return GetRemoteMetadata(id); |
178 | return SimianGetMetadataOperation(id); | 178 | return SimianGetMetadataOperation(id); |
179 | } | 179 | } |
180 | 180 | ||
181 | public byte[] GetData(string id) | 181 | public byte[] GetData(string id) |
182 | { | 182 | { |
183 | if (String.IsNullOrEmpty(m_serverUrl)) | 183 | if (String.IsNullOrEmpty(m_serverUrl)) |
@@ -296,7 +296,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
296 | 296 | ||
297 | return SimianStoreOperation(asset); | 297 | return SimianStoreOperation(asset); |
298 | } | 298 | } |
299 | 299 | ||
300 | /// <summary> | 300 | /// <summary> |
301 | /// Update an asset's content | 301 | /// Update an asset's content |
302 | /// </summary> | 302 | /// </summary> |
@@ -344,7 +344,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
344 | 344 | ||
345 | return SimianDeleteOperation(id); | 345 | return SimianDeleteOperation(id); |
346 | } | 346 | } |
347 | 347 | ||
348 | #endregion IAssetService | 348 | #endregion IAssetService |
349 | 349 | ||
350 | #region SimianOperations | 350 | #region SimianOperations |
@@ -369,9 +369,9 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
369 | m_log.WarnFormat("[SIMIAN ASSET CONNECTOR]: failed to delete asset; {0}",response["Message"].AsString()); | 369 | m_log.WarnFormat("[SIMIAN ASSET CONNECTOR]: failed to delete asset; {0}",response["Message"].AsString()); |
370 | return false; | 370 | return false; |
371 | } | 371 | } |
372 | 372 | ||
373 | return true; | 373 | return true; |
374 | 374 | ||
375 | } | 375 | } |
376 | catch (Exception ex) | 376 | catch (Exception ex) |
377 | { | 377 | { |
@@ -400,7 +400,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
400 | { "Temporary", asset.Temporary ? "1" : "0" }, | 400 | { "Temporary", asset.Temporary ? "1" : "0" }, |
401 | { "Name", asset.Name } | 401 | { "Name", asset.Name } |
402 | }; | 402 | }; |
403 | 403 | ||
404 | OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); | 404 | OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); |
405 | if (! response["Success"].AsBoolean()) | 405 | if (! response["Success"].AsBoolean()) |
406 | { | 406 | { |
@@ -410,13 +410,13 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
410 | 410 | ||
411 | // asset.ID is always set before calling this function | 411 | // asset.ID is always set before calling this function |
412 | return asset.ID; | 412 | return asset.ID; |
413 | 413 | ||
414 | } | 414 | } |
415 | catch (Exception ex) | 415 | catch (Exception ex) |
416 | { | 416 | { |
417 | m_log.ErrorFormat("[SIMIAN ASSET CONNECTOR] failed to store asset; {0}",ex.Message); | 417 | m_log.ErrorFormat("[SIMIAN ASSET CONNECTOR] failed to store asset; {0}",ex.Message); |
418 | } | 418 | } |
419 | 419 | ||
420 | return null; | 420 | return null; |
421 | } | 421 | } |
422 | 422 | ||
@@ -427,12 +427,12 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
427 | /// <returns></returns> | 427 | /// <returns></returns> |
428 | private AssetBase SimianGetOperation(string id) | 428 | private AssetBase SimianGetOperation(string id) |
429 | { | 429 | { |
430 | try | 430 | try |
431 | { | 431 | { |
432 | NameValueCollection requestArgs = new NameValueCollection | 432 | NameValueCollection requestArgs = new NameValueCollection |
433 | { | 433 | { |
434 | { "RequestMethod", "xGetAsset" }, | 434 | { "RequestMethod", "xGetAsset" }, |
435 | { "ID", id } | 435 | { "ID", id } |
436 | }; | 436 | }; |
437 | 437 | ||
438 | OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); | 438 | OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); |
@@ -441,7 +441,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
441 | m_log.WarnFormat("[SIMIAN ASSET CONNECTOR] Failed to get asset; {0}",response["Message"].AsString()); | 441 | m_log.WarnFormat("[SIMIAN ASSET CONNECTOR] Failed to get asset; {0}",response["Message"].AsString()); |
442 | return null; | 442 | return null; |
443 | } | 443 | } |
444 | 444 | ||
445 | AssetBase asset = new AssetBase(); | 445 | AssetBase asset = new AssetBase(); |
446 | 446 | ||
447 | asset.ID = id; | 447 | asset.ID = id; |
@@ -475,7 +475,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
475 | NameValueCollection requestArgs = new NameValueCollection | 475 | NameValueCollection requestArgs = new NameValueCollection |
476 | { | 476 | { |
477 | { "RequestMethod", "xGetAssetMetadata" }, | 477 | { "RequestMethod", "xGetAssetMetadata" }, |
478 | { "ID", id } | 478 | { "ID", id } |
479 | }; | 479 | }; |
480 | 480 | ||
481 | OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); | 481 | OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); |
@@ -485,7 +485,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
485 | // m_log.DebugFormat("[SIMIAN ASSET CONNECTOR] Failed to get asset metadata; {0}",response["Message"].AsString()); | 485 | // m_log.DebugFormat("[SIMIAN ASSET CONNECTOR] Failed to get asset metadata; {0}",response["Message"].AsString()); |
486 | return null; | 486 | return null; |
487 | } | 487 | } |
488 | 488 | ||
489 | AssetMetadata metadata = new AssetMetadata(); | 489 | AssetMetadata metadata = new AssetMetadata(); |
490 | metadata.ID = id; | 490 | metadata.ID = id; |
491 | metadata.ContentType = response["ContentType"].AsString(); | 491 | metadata.ContentType = response["ContentType"].AsString(); |
@@ -620,7 +620,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
620 | // } | 620 | // } |
621 | 621 | ||
622 | // string errorMessage = null; | 622 | // string errorMessage = null; |
623 | 623 | ||
624 | // // Build the remote storage request | 624 | // // Build the remote storage request |
625 | // List<MultipartForm.Element> postParameters = new List<MultipartForm.Element>() | 625 | // List<MultipartForm.Element> postParameters = new List<MultipartForm.Element>() |
626 | // { | 626 | // { |