Allow an incoming identifier to be specified for a JsonStore.

This commit is contained in:
Mic Bowman
2012-09-11 16:42:07 -07:00
parent d53a53d4c5
commit f06394f195
3 changed files with 9 additions and 9 deletions

View File

@@ -175,14 +175,15 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
///
/// </summary>
// -----------------------------------------------------------------
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;
}
}