aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-06-23 14:35:35 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-06-23 16:29:51 +0200
commitbe873f64540d3c0b1227920eb466097ed738f452 (patch)
tree2ec34f28701e437c650e530b427a88bcc76e3113 /src/util.cpp
parentfcb0a1bb9cea0e627152e544b0701c039cc3f60e (diff)
Issue warning if collecting RandSeed data failed
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 1480b2ebf8..7946089571 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -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
}