Reintroduce AssetBase's old behavior. A Parameterless constructor is required

for .NET serialization and removing it breaks the OpenSim asset server
protocol.
0.6.8-post-fixes
Melanie 2009-11-06 10:33:49 +00:00
parent 1cddc85078
commit 5300e8506d
1 changed files with 10 additions and 0 deletions

View File

@ -51,6 +51,16 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
private AssetMetadata m_metadata; private AssetMetadata m_metadata;
// This is needed for .NET serialization!!!
// Do NOT "Optimize" away!
public AssetBase()
{
m_metadata = new AssetMetadata();
m_metadata.FullID = UUID.Zero;
m_metadata.ID = UUID.Zero.ToString();
m_metadata.Type = (sbyte)AssetType.Unknown;
}
public AssetBase(UUID assetID, string name, sbyte assetType) public AssetBase(UUID assetID, string name, sbyte assetType)
{ {
if (assetType == (sbyte)AssetType.Unknown) if (assetType == (sbyte)AssetType.Unknown)