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

[PATCH] Make pyVault::AddChronicleEntry a blocking operation to avoid

H-uru:
From f45679a54f Mon Sep 17 00:00:00 2001
From: Adam Johnson <AdamJohnso@gmail.com>
Date: Sun, 15 Jan 2012 18:35:05 -0500
Subject: [PATCH] Make pyVault::AddChronicleEntry a blocking operation to avoid
 a race condition
This commit is contained in:
2021-07-21 15:22:29 -06:00
committed by rarified
parent ae019b8df9
commit 926267c6de
3 changed files with 4 additions and 35 deletions

View File

@ -365,7 +365,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);