From f06394f19509516005aa7003a6e5e599ad8b7df0 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Tue, 11 Sep 2012 16:42:07 -0700 Subject: Allow an incoming identifier to be specified for a JsonStore. --- .../OptionalModules/Scripting/JsonStore/JsonStoreModule.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs') diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs index 311531c..732c28f 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs @@ -175,14 +175,15 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore /// /// // ----------------------------------------------------------------- - public bool CreateStore(string value, out UUID result) + public bool CreateStore(string value, ref UUID result) { - result = UUID.Zero; + if (result == UUID.Zero) + result = UUID.Random(); + + JsonStore map = null; if (! m_enabled) return false; - UUID uuid = UUID.Random(); - JsonStore map = null; try { @@ -195,9 +196,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore } lock (m_JsonValueStore) - m_JsonValueStore.Add(uuid,map); + m_JsonValueStore.Add(result,map); - result = uuid; return true; } @@ -231,7 +231,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore if (! m_JsonValueStore.TryGetValue(storeID,out map)) { m_log.InfoFormat("[JsonStore] Missing store {0}",storeID); - return true; + return false; } } -- cgit v1.1 From 0d15a6a01feeb129b015f7516fd13a541b3e6fce Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 12 Nov 2012 19:18:20 +0000 Subject: Remove any mention of IRegionModule from region names and comments to aid grepping for remaining uses --- OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs') diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs index 732c28f..e68764a 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs @@ -59,7 +59,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore private Dictionary m_JsonValueStore; private UUID m_sharedStore; -#region IRegionModule Members +#region Region Module interface // ----------------------------------------------------------------- /// -- cgit v1.1