From 8321ecb7a26f443a0f137457da5b6e780a824c6c Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sun, 9 Sep 2012 13:50:44 -0400 Subject: [PATCH 1/3] Revert "Move addin information to CoreModulePlugin.addin.xml" This reverts commit 2ec34580ce3807cede97539488237040e1a8a6cc. Moving the attributes for mono addins back to the source file - this also fixes http://opensimulator.org/mantis/view.php?id=6278. --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 6 +++++- .../CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs | 2 +- .../Region/CoreModules/Resources/CoreModulePlugin.addin.xml | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 4bce4169b0..fab489dbd4 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -49,8 +49,12 @@ using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; -namespace OpenSim.Region.CoreModules.Asset +[assembly: Addin("FlotsamAssetCache", "1.1")] +[assembly: AddinDependency("OpenSim", "0.5")] + +namespace Flotsam.RegionModules.AssetCache { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] public class FlotsamAssetCache : ISharedRegionModule, IImprovedAssetCache, IAssetService { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs index 9276d1a526..c91b25fac2 100644 --- a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs +++ b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs @@ -35,7 +35,7 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenMetaverse.Assets; -using OpenSim.Region.CoreModules.Asset; +using Flotsam.RegionModules.AssetCache; using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Serialization; diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index a09945e2a7..424e0ab384 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -34,7 +34,6 @@ - From bf56b30024f9ee945bba2836dcd9d092ed71330b Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sun, 9 Sep 2012 14:30:59 -0400 Subject: [PATCH 2/3] Adjust namespce of FlotsamCache Place FloatsamCache in the same namespace as our other core asset caches --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 2 +- .../Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index fab489dbd4..5d8a278f23 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -52,7 +52,7 @@ using OpenSim.Services.Interfaces; [assembly: Addin("FlotsamAssetCache", "1.1")] [assembly: AddinDependency("OpenSim", "0.5")] -namespace Flotsam.RegionModules.AssetCache +namespace OpenSim.Region.CoreModules.Asset { [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] public class FlotsamAssetCache : ISharedRegionModule, IImprovedAssetCache, IAssetService diff --git a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs index c91b25fac2..1c2bfd0dff 100644 --- a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs +++ b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs @@ -35,7 +35,6 @@ using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenMetaverse.Assets; -using Flotsam.RegionModules.AssetCache; using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Serialization; From 8db5d79f4bc3590edfb8bee7918d3bbb1e286dcb Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Mon, 10 Sep 2012 12:18:40 +0100 Subject: [PATCH 3/3] passing in the function name to MOD_Api.ConvertFromLSL for more user-friendly error messages --- .../ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs index cde2d9f068..6809c09d05 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs @@ -254,7 +254,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api object[] convertedParms = new object[parms.Length]; for (int i = 0; i < parms.Length; i++) - convertedParms[i] = ConvertFromLSL(parms[i],signature[i]); + convertedParms[i] = ConvertFromLSL(parms[i],signature[i], fname); // now call the function, the contract with the function is that it will always return // non-null but don't trust it completely @@ -294,7 +294,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// /// - protected object ConvertFromLSL(object lslparm, Type type) + protected object ConvertFromLSL(object lslparm, Type type, string fname) { // ---------- String ---------- if (lslparm is LSL_String) @@ -374,14 +374,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api (LSL_Vector)plist[i]); } else - MODError("unknown LSL list element type"); + MODError(String.Format("{0}: unknown LSL list element type", fname)); } return result; } } - MODError(String.Format("parameter type mismatch; expecting {0}",type.Name)); + MODError(String.Format("{1}: parameter type mismatch; expecting {0}",type.Name, fname)); return null; }