aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Asset
diff options
context:
space:
mode:
authorOren Hurvitz2014-04-01 14:58:34 +0300
committerOren Hurvitz2014-04-02 06:32:40 +0100
commitfad0fd7f75a5829303944bb59c940afba3448b17 (patch)
tree2a1c94c288dc67e55c05bc2ff3ba7563549ad6aa /OpenSim/Server/Handlers/Asset
parentAdded assets service method AssetsExist(), which returns whether the given li... (diff)
downloadopensim-SC-fad0fd7f75a5829303944bb59c940afba3448b17.zip
opensim-SC-fad0fd7f75a5829303944bb59c940afba3448b17.tar.gz
opensim-SC-fad0fd7f75a5829303944bb59c940afba3448b17.tar.bz2
opensim-SC-fad0fd7f75a5829303944bb59c940afba3448b17.tar.xz
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...
Diffstat (limited to 'OpenSim/Server/Handlers/Asset')
-rw-r--r--OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs17
1 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs
index 8eebc61..5122a77 100644
--- a/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Server.Handlers.Asset
58 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 58 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
59 { 59 {
60 AssetBase asset; 60 AssetBase asset;
61 XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); 61 XmlSerializer xs = new XmlSerializer(typeof(AssetBase));
62 62
63 try 63 try
64 { 64 {
@@ -71,18 +71,21 @@ namespace OpenSim.Server.Handlers.Asset
71 } 71 }
72 72
73 string[] p = SplitParams(path); 73 string[] p = SplitParams(path);
74 if (p.Length > 1) 74 if (p.Length > 0)
75 { 75 {
76 bool result = m_AssetService.UpdateContent(p[1], asset.Data); 76 string id = p[0];
77 bool result = m_AssetService.UpdateContent(id, asset.Data);
77 78
78 xs = new XmlSerializer(typeof(bool)); 79 xs = new XmlSerializer(typeof(bool));
79 return ServerUtils.SerializeResult(xs, result); 80 return ServerUtils.SerializeResult(xs, result);
80 } 81 }
82 else
83 {
84 string id = m_AssetService.Store(asset);
81 85
82 string id = m_AssetService.Store(asset); 86 xs = new XmlSerializer(typeof(string));
83 87 return ServerUtils.SerializeResult(xs, id);
84 xs = new XmlSerializer(typeof(string)); 88 }
85 return ServerUtils.SerializeResult(xs, id);
86 } 89 }
87 } 90 }
88} 91}