aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
diff options
context:
space:
mode:
authorMic Bowman2013-02-08 12:00:16 -0800
committerMic Bowman2013-02-08 12:00:16 -0800
commit2b5eba9c7438ef0175c91c1910ce2d660d930fed (patch)
treeca42613ad287c72046c14b58d8ca05455da2ff85 /OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
parentIf a component of a coalesced object fails to deserialization, do not add a n... (diff)
downloadopensim-SC_OLD-2b5eba9c7438ef0175c91c1910ce2d660d930fed.zip
opensim-SC_OLD-2b5eba9c7438ef0175c91c1910ce2d660d930fed.tar.gz
opensim-SC_OLD-2b5eba9c7438ef0175c91c1910ce2d660d930fed.tar.bz2
opensim-SC_OLD-2b5eba9c7438ef0175c91c1910ce2d660d930fed.tar.xz
Fix the return values for JsonDestroyStore, JsonRemoveValue, and JsonSetValue.
Fix the link message status when reading a notecard.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
index 5808d46..c7f0001 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
@@ -250,6 +250,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
250 return true; 250 return true;
251 } 251 }
252 252
253 // pkey will be the final element in the path, we pull it out here to make sure
254 // that the assignment works correctly
253 string pkey = path.Pop(); 255 string pkey = path.Pop();
254 string pexpr = PathExpressionToKey(path); 256 string pexpr = PathExpressionToKey(path);
255 if (pexpr != "") 257 if (pexpr != "")
@@ -259,7 +261,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
259 if (result == null) 261 if (result == null)
260 return false; 262 return false;
261 263
262 // Check for and extract array references 264 // Check pkey, the last element in the path, for and extract array references
263 MatchCollection amatches = m_ArrayPattern.Matches(pkey,0); 265 MatchCollection amatches = m_ArrayPattern.Matches(pkey,0);
264 if (amatches.Count > 0) 266 if (amatches.Count > 0)
265 { 267 {
@@ -307,16 +309,23 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
307 309
308 if (result is OSDMap) 310 if (result is OSDMap)
309 { 311 {
312 // this is the assignment case
310 OSDMap hmap = result as OSDMap; 313 OSDMap hmap = result as OSDMap;
311 if (ovalue != null) 314 if (ovalue != null)
312 { 315 {
313 hmap[hkey] = ovalue; 316 hmap[hkey] = ovalue;
314 InvokeNextCallback(pexpr + pkey); 317 InvokeNextCallback(pexpr + pkey);
318 return true;
315 } 319 }
316 else if (hmap.ContainsKey(hkey)) 320
321 // this is the remove case
322 if (hmap.ContainsKey(hkey))
323 {
317 hmap.Remove(hkey); 324 hmap.Remove(hkey);
318 325 return true;
319 return true; 326 }
327
328 return false;
320 } 329 }
321 330
322 return false; 331 return false;