diff options
author | Mic Bowman | 2012-09-11 16:42:07 -0700 |
---|---|---|
committer | Mic Bowman | 2012-09-11 16:42:07 -0700 |
commit | f06394f19509516005aa7003a6e5e599ad8b7df0 (patch) | |
tree | dec335d9dbe2f735b5ea9503447c1e7e0505f464 /OpenSim/Region/OptionalModules/Scripting/JsonStore | |
parent | Make "show http-handlers" command available for ROBUST instances as well as t... (diff) | |
download | opensim-SC_OLD-f06394f19509516005aa7003a6e5e599ad8b7df0.zip opensim-SC_OLD-f06394f19509516005aa7003a6e5e599ad8b7df0.tar.gz opensim-SC_OLD-f06394f19509516005aa7003a6e5e599ad8b7df0.tar.bz2 opensim-SC_OLD-f06394f19509516005aa7003a6e5e599ad8b7df0.tar.xz |
Allow an incoming identifier to be specified for a JsonStore.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/JsonStore')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs | 2 |
2 files changed, 8 insertions, 8 deletions
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 | |||
175 | /// | 175 | /// |
176 | /// </summary> | 176 | /// </summary> |
177 | // ----------------------------------------------------------------- | 177 | // ----------------------------------------------------------------- |
178 | public bool CreateStore(string value, out UUID result) | 178 | public bool CreateStore(string value, ref UUID result) |
179 | { | 179 | { |
180 | result = UUID.Zero; | 180 | if (result == UUID.Zero) |
181 | result = UUID.Random(); | ||
182 | |||
183 | JsonStore map = null; | ||
181 | 184 | ||
182 | if (! m_enabled) return false; | 185 | if (! m_enabled) return false; |
183 | 186 | ||
184 | UUID uuid = UUID.Random(); | ||
185 | JsonStore map = null; | ||
186 | 187 | ||
187 | try | 188 | try |
188 | { | 189 | { |
@@ -195,9 +196,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
195 | } | 196 | } |
196 | 197 | ||
197 | lock (m_JsonValueStore) | 198 | lock (m_JsonValueStore) |
198 | m_JsonValueStore.Add(uuid,map); | 199 | m_JsonValueStore.Add(result,map); |
199 | 200 | ||
200 | result = uuid; | ||
201 | return true; | 201 | return true; |
202 | } | 202 | } |
203 | 203 | ||
@@ -231,7 +231,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
231 | if (! m_JsonValueStore.TryGetValue(storeID,out map)) | 231 | if (! m_JsonValueStore.TryGetValue(storeID,out map)) |
232 | { | 232 | { |
233 | m_log.InfoFormat("[JsonStore] Missing store {0}",storeID); | 233 | m_log.InfoFormat("[JsonStore] Missing store {0}",storeID); |
234 | return true; | 234 | return false; |
235 | } | 235 | } |
236 | } | 236 | } |
237 | 237 | ||
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs index eaba816..6910d14 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs | |||
@@ -227,7 +227,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
227 | protected UUID JsonCreateStore(UUID hostID, UUID scriptID, string value) | 227 | protected UUID JsonCreateStore(UUID hostID, UUID scriptID, string value) |
228 | { | 228 | { |
229 | UUID uuid = UUID.Zero; | 229 | UUID uuid = UUID.Zero; |
230 | if (! m_store.CreateStore(value, out uuid)) | 230 | if (! m_store.CreateStore(value, ref uuid)) |
231 | GenerateRuntimeError("Failed to create Json store"); | 231 | GenerateRuntimeError("Failed to create Json store"); |
232 | 232 | ||
233 | return uuid; | 233 | return uuid; |