mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
- remove the Metadata property from AssetBase and return all previous
properties as before - prefix private variables with m_ in AssetBase.cs - related to Mantis #3122, as mentioned in https://lists.berlios.de/pipermail/opensim-dev/2009-February/005088.html - all services will likely need to be upgraded after this commit
This commit is contained in:
@@ -61,7 +61,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
|
||||
if (asset == null) ret = BackendResponse.NotFound;
|
||||
else
|
||||
{
|
||||
metadata = asset.Metadata;
|
||||
metadata = asset.getMetadata();
|
||||
ret = BackendResponse.Success;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
|
||||
public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset)
|
||||
{
|
||||
asset = new AssetBase();
|
||||
AssetMetadata metadata = asset.Metadata;
|
||||
AssetMetadata metadata = asset.getMetadata();
|
||||
|
||||
string filename;
|
||||
BackendResponse ret;
|
||||
@@ -116,8 +116,8 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
|
||||
ret = BackendResponse.Failure;
|
||||
}
|
||||
|
||||
asset.Metadata.Type = (sbyte) Utils.ContentTypeToSLAssetType(asset.Metadata.ContentType);
|
||||
asset.Metadata.Local = false;
|
||||
asset.Type = (sbyte) Utils.ContentTypeToSLAssetType(metadata.ContentType);
|
||||
asset.Local = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -139,11 +139,12 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
|
||||
public BackendResponse TryCreateAsset(AssetBase asset)
|
||||
{
|
||||
BackendResponse ret;
|
||||
AssetMetadata metadata = asset.getMetadata();
|
||||
|
||||
string path;
|
||||
string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(asset.Metadata.ContentType));
|
||||
string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(metadata.ContentType));
|
||||
|
||||
if (asset.Metadata.Temporary)
|
||||
if (asset.Temporary)
|
||||
path = Path.Combine(TEMP_DATA_DIR, filename);
|
||||
else
|
||||
path = Path.Combine(DEFAULT_DATA_DIR, filename);
|
||||
@@ -154,10 +155,10 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
|
||||
lock (filenames) filenames[asset.FullID] = path;
|
||||
|
||||
// Set the creation date to right now
|
||||
asset.Metadata.CreationDate = DateTime.Now;
|
||||
metadata.CreationDate = DateTime.Now;
|
||||
|
||||
lock (metadataStorage)
|
||||
metadataStorage[asset.FullID] = asset.Metadata;
|
||||
metadataStorage[asset.FullID] = metadata;
|
||||
|
||||
ret = BackendResponse.Success;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace OpenSim.Grid.AssetServer
|
||||
XmlSerializer xs = new XmlSerializer(typeof (AssetBase));
|
||||
AssetBase asset = (AssetBase) xs.Deserialize(request);
|
||||
|
||||
m_log.InfoFormat("[REST]: Creating asset {0}", asset.Metadata.FullID);
|
||||
m_log.InfoFormat("[REST]: Creating asset {0}", asset.FullID);
|
||||
m_assetProvider.CreateAsset(asset);
|
||||
|
||||
return new byte[] {};
|
||||
|
||||
Reference in New Issue
Block a user