From f8beeb1e93daf2aba2892339ba284dad9ccff906 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 15 Dec 2010 08:15:12 +0100 Subject: Fix casts in llSetPayPrice --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 11 ++++++++++- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 +++++----- 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 6ed4867..e542d7d 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -271,7 +271,16 @@ namespace Flotsam.RegionModules.AssetCache // If the file is already cached, don't cache it, just touch it so access time is updated if (File.Exists(filename)) { - File.SetLastAccessTime(filename, DateTime.Now); + // We don't really want to know about sharing + // violations here. If the file is locked, then + // the other thread has updated the time for us. + try + { + File.SetLastAccessTime(filename, DateTime.Now); + } + catch + { + } } else { // Once we start writing, make sure we flag that we're writing diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 835f274..f06fd24 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -9816,11 +9816,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } int[] nPrice = new int[5]; - nPrice[0]=price; - nPrice[1] = (LSL_Integer)Convert.ToInt32(quick_pay_buttons.Data[0]); - nPrice[2] = (LSL_Integer)Convert.ToInt32(quick_pay_buttons.Data[1]); - nPrice[3] = (LSL_Integer)Convert.ToInt32(quick_pay_buttons.Data[2]); - nPrice[4] = (LSL_Integer)Convert.ToInt32(quick_pay_buttons.Data[3]); + nPrice[0] = price; + nPrice[1] = quick_pay_buttons.GetLSLIntegerItem(0); + nPrice[2] = quick_pay_buttons.GetLSLIntegerItem(1); + nPrice[3] = quick_pay_buttons.GetLSLIntegerItem(2); + nPrice[4] = quick_pay_buttons.GetLSLIntegerItem(3); m_host.ParentGroup.RootPart.PayPrice = nPrice; m_host.ParentGroup.HasGroupChanged = true; } -- cgit v1.1