mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
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...
This commit is contained in:
@@ -58,7 +58,7 @@ namespace OpenSim.Server.Handlers.Asset
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
AssetBase asset;
|
||||
XmlSerializer xs = new XmlSerializer(typeof (AssetBase));
|
||||
XmlSerializer xs = new XmlSerializer(typeof(AssetBase));
|
||||
|
||||
try
|
||||
{
|
||||
@@ -71,18 +71,21 @@ namespace OpenSim.Server.Handlers.Asset
|
||||
}
|
||||
|
||||
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));
|
||||
return ServerUtils.SerializeResult(xs, result);
|
||||
}
|
||||
else
|
||||
{
|
||||
string id = m_AssetService.Store(asset);
|
||||
|
||||
string id = m_AssetService.Store(asset);
|
||||
|
||||
xs = new XmlSerializer(typeof(string));
|
||||
return ServerUtils.SerializeResult(xs, id);
|
||||
xs = new XmlSerializer(typeof(string));
|
||||
return ServerUtils.SerializeResult(xs, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user