Eliminate data races for strMiscWarning and fLargeWork*Found.

This moves all access to these datastructures through accessor functions
 and protects them with a lock.
This commit is contained in:
Gregory Maxwell
2016-11-29 09:46:19 +00:00
parent c63198f1c7
commit e3ba0ef956
4 changed files with 53 additions and 16 deletions

View File

@@ -103,8 +103,8 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample)
if (!fMatch)
{
fDone = true;
string strMessage = strprintf(_("Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly."), _(PACKAGE_NAME));
strMiscWarning = strMessage;
std::string strMessage = strprintf(_("Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly."), _(PACKAGE_NAME));
SetMiscWarning(strMessage);
uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_WARNING);
}
}