Fixed the "Update Asset" handler: it was looking for the Asset ID in the wrong parameter.

This doesn't actually matter because the "Update Asset" operation isn't implemented in AssetsServer. But still, the handler should do the right thing...
0.8.0.3
Oren Hurvitz 2014-04-01 14:58:34 +03:00
parent d1c3f8eef5
commit fad0fd7f75
1 changed files with 10 additions and 7 deletions

View File

@ -58,7 +58,7 @@ namespace OpenSim.Server.Handlers.Asset
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{ {
AssetBase asset; AssetBase asset;
XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); XmlSerializer xs = new XmlSerializer(typeof(AssetBase));
try try
{ {
@ -71,18 +71,21 @@ namespace OpenSim.Server.Handlers.Asset
} }
string[] p = SplitParams(path); string[] p = SplitParams(path);
if (p.Length > 1) if (p.Length > 0)
{ {
bool result = m_AssetService.UpdateContent(p[1], asset.Data); string id = p[0];
bool result = m_AssetService.UpdateContent(id, asset.Data);
xs = new XmlSerializer(typeof(bool)); xs = new XmlSerializer(typeof(bool));
return ServerUtils.SerializeResult(xs, result); return ServerUtils.SerializeResult(xs, result);
} }
else
{
string id = m_AssetService.Store(asset); string id = m_AssetService.Store(asset);
xs = new XmlSerializer(typeof(string)); xs = new XmlSerializer(typeof(string));
return ServerUtils.SerializeResult(xs, id); return ServerUtils.SerializeResult(xs, id);
} }
} }
}
} }