2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

Make pyVault::AddChronicleEntry a blocking operation to avoid a race

condition
This commit is contained in:
2012-01-15 18:35:05 -05:00
parent 0e11edf24e
commit f45679a54f
3 changed files with 4 additions and 35 deletions

View File

@ -364,7 +364,10 @@ void pyVault::AddChronicleEntry( const char * name, UInt32 type, const char * va
wchar * wEntryName = StrDupToUnicode(name);
wchar * wEntryValue = StrDupToUnicode(value);
VaultAddChronicleEntry(wEntryName, type, wEntryValue);
// FIXME: We should ideally not block, but for now, the Python assumes that when
// we return, the chronicle exists and can be found with findChronicleEntry.
// Maybe we should insert a dummy into the tree? (currently hard)
VaultAddChronicleEntryAndWait(wEntryName, type, wEntryValue);
FREE(wEntryName);
FREE(wEntryValue);