From 13da5a9fbaa0c50a8a49da1a30b2cd6ce75a3648 Mon Sep 17 00:00:00 2001 From: diva Date: Mon, 18 May 2009 20:04:59 +0000 Subject: Finished HG Service Store. Not fully functional because of problems with asset.ID insisting on being a UUID string. --- OpenSim/Services/AssetService/HGAssetService.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AssetService/HGAssetService.cs b/OpenSim/Services/AssetService/HGAssetService.cs index 415a0f5..cf275ab 100644 --- a/OpenSim/Services/AssetService/HGAssetService.cs +++ b/OpenSim/Services/AssetService/HGAssetService.cs @@ -94,7 +94,7 @@ namespace OpenSim.Services.AssetService // We're instantiating this class explicitly, but this won't // work in general, because the remote grid may be running // an asset server that has a different protocol. - // Eventually we will want a piece of meta-protocol asking + // Eventually we will want a piece of protocol asking // the remote server about its kind. Definitely cool thing to do! connector = new AssetServicesConnector(url); m_connectors.Add(url, connector); @@ -152,6 +152,17 @@ namespace OpenSim.Services.AssetService public string Store(AssetBase asset) { + string url = string.Empty; + string assetID = string.Empty; + + if (StringToUrlAndAssetID(asset.ID, out url, out assetID)) + { + IAssetService connector = GetConnector(url); + // Restore the assetID to a simple UUID + asset.ID = assetID; + return connector.Store(asset); + } + return String.Empty; } -- cgit v1.1