Changeset View
Changeset View
Standalone View
Standalone View
src/qt/winshutdownmonitor.cpp
Show All 21 Lines | bool WinShutdownMonitor::nativeEventFilter(const QByteArray &eventType, | ||||
MSG *pMsg = static_cast<MSG *>(pMessage); | MSG *pMsg = static_cast<MSG *>(pMessage); | ||||
// Seed OpenSSL PRNG with Windows event data (e.g. mouse movements and | // Seed OpenSSL PRNG with Windows event data (e.g. mouse movements and | ||||
// other user interactions) | // other user interactions) | ||||
if (RAND_event(pMsg->message, pMsg->wParam, pMsg->lParam) == 0) { | if (RAND_event(pMsg->message, pMsg->wParam, pMsg->lParam) == 0) { | ||||
// Warn only once as this is performance-critical | // Warn only once as this is performance-critical | ||||
static bool warned = false; | static bool warned = false; | ||||
if (!warned) { | if (!warned) { | ||||
LogPrintf("%s: OpenSSL RAND_event() failed to seed OpenSSL PRNG " | LogPrint(BCLog::QT, | ||||
"%s: OpenSSL RAND_event() failed to seed OpenSSL PRNG " | |||||
"with enough data.\n", | "with enough data.\n", | ||||
__func__); | __func__); | ||||
warned = true; | warned = true; | ||||
} | } | ||||
} | } | ||||
switch (pMsg->message) { | switch (pMsg->message) { | ||||
case WM_QUERYENDSESSION: { | case WM_QUERYENDSESSION: { | ||||
// Initiate a client shutdown after receiving a WM_QUERYENDSESSION | // Initiate a client shutdown after receiving a WM_QUERYENDSESSION | ||||
// and block | // and block | ||||
Show All 34 Lines |