aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
diff options
context:
space:
mode:
authordiva2009-05-15 05:00:25 +0000
committerdiva2009-05-15 05:00:25 +0000
commit5e4fc6e91e5edffd1dc23af4f583d6294f394a3d (patch)
tree497076db68193be2d14fc3788c1d80c74d8c977d /OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
parentsome sculpted prim geometry accuracy and meshing speed improvements (diff)
downloadopensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.zip
opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.gz
opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.bz2
opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.xz
Heart surgery on asset service code bits. Affects OpenSim.ini configuration -- please see the example. Affects region servers only.
This may break a lot of things, but it needs to go in. It was tested in standalone and the UCI grid, but it needs a lot more testing. Known problems: * HG asset transfers are borked for now * missing texture is missing * 3 unit tests commented out for now
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
index 77c14c6..cd2074a 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
@@ -190,14 +190,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
190 190
191 private void DoGet(AssetRequestData rdata) 191 private void DoGet(AssetRequestData rdata)
192 { 192 {
193 bool istexture = false;
194
195 Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method); 193 Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method);
196 194
197 if (rdata.Parameters.Length == 1) 195 if (rdata.Parameters.Length == 1)
198 { 196 {
199 UUID uuid = new UUID(rdata.Parameters[0]); 197 UUID uuid = new UUID(rdata.Parameters[0]);
200 AssetBase asset = Rest.AssetServices.GetAsset(uuid, istexture); 198 AssetBase asset = Rest.AssetServices.Get(uuid.ToString());
201 199
202 if (asset != null) 200 if (asset != null)
203 { 201 {
@@ -258,7 +256,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
258 } 256 }
259 257
260 UUID uuid = new UUID(rdata.Parameters[0]); 258 UUID uuid = new UUID(rdata.Parameters[0]);
261 asset = Rest.AssetServices.GetAsset(uuid, false); 259 asset = Rest.AssetServices.Get(uuid.ToString());
262 260
263 modified = (asset != null); 261 modified = (asset != null);
264 created = !modified; 262 created = !modified;
@@ -278,7 +276,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
278 MsgId, rdata.Parameters[0], asset.ID); 276 MsgId, rdata.Parameters[0], asset.ID);
279 } 277 }
280 278
281 Rest.AssetServices.AddAsset(asset); 279 Rest.AssetServices.Store(asset);
282 280
283 } 281 }
284 else 282 else
@@ -338,7 +336,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
338 } 336 }
339 337
340 UUID uuid = new UUID(xml.GetAttribute("id")); 338 UUID uuid = new UUID(xml.GetAttribute("id"));
341 AssetBase asset = Rest.AssetServices.GetAsset(uuid, false); 339 AssetBase asset = Rest.AssetServices.Get(uuid.ToString());
342 340
343 modified = (asset != null); 341 modified = (asset != null);
344 created = !modified; 342 created = !modified;
@@ -352,7 +350,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
352 asset.Temporary = Int32.Parse(xml.GetAttribute("temporary")) != 0; 350 asset.Temporary = Int32.Parse(xml.GetAttribute("temporary")) != 0;
353 asset.Data = Convert.FromBase64String(xml.ReadElementContentAsString("Asset", "")); 351 asset.Data = Convert.FromBase64String(xml.ReadElementContentAsString("Asset", ""));
354 352
355 Rest.AssetServices.AddAsset(asset); 353 Rest.AssetServices.Store(asset);
356 354
357 if (created) 355 if (created)
358 { 356 {