Skip to content

Commit

Permalink
Issue warning if collecting RandSeed data failed
Browse files Browse the repository at this point in the history
  • Loading branch information
laanwj committed Jun 23, 2014
1 parent fcb0a1b commit be873f6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/util.cpp
Expand Up @@ -176,7 +176,14 @@ void RandAddSeedPerfmon()
{
RAND_add(begin_ptr(vData), nSize, nSize/100.0);
OPENSSL_cleanse(begin_ptr(vData), nSize);
LogPrint("rand", "RandAddSeed() %lu bytes\n", nSize);
LogPrint("rand", "%s: %lu bytes\n", __func__, nSize);
} else {
static bool warned = false; // Warn only once
if (!warned)
{
LogPrintf("%s: Warning: RegQueryValueExA(HKEY_PERFORMANCE_DATA) failed with code %i\n", __func__, ret);
warned = true;
}
}
#endif
}
Expand Down

0 comments on commit be873f6

Please sign in to comment.