diff options
author | fanquake <fanquake@gmail.com> | 2022-04-06 13:15:26 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-04-06 13:19:36 +0100 |
commit | d906329c28c24b3e9e4471bf0ebb22af3503e419 (patch) | |
tree | c8ea8e5031a654852326b9dc93def9cdff59d6c6 /src/httpserver.cpp | |
parent | bbb83f0b2b2671980c06453fd243b1f2801a1cc4 (diff) | |
parent | e40779a4fee03c6c455149bd8e9d1a7ccd991450 (diff) |
Merge bitcoin/bitcoin#24681: build: Bump libevent minimum version up to 2.1.8
e40779a4fee03c6c455149bd8e9d1a7ccd991450 refactor: Remove outdated libevent logging code (Fabian Jahr)
0598f36852199d0cee8fe9e676a2e0bec3ebf624 refactor: account for requiring libevent 2.1.8+ (fanquake)
aaf72d62c18f9cb325c150cf0cc21abb201607c8 build: Bump libevent minimum version up to 2.1.8 (Hennadii Stepanov)
Pull request description:
Required to support new functionality in bitcoin/bitcoin#19420.
`libevent` availability: https://repology.org/project/libevent/versions
ACKs for top commit:
laanwj:
Code review ACK e40779a4fee03c6c455149bd8e9d1a7ccd991450
fanquake:
ACK e40779a4fee03c6c455149bd8e9d1a7ccd991450
Tree-SHA512: ccb14ea2f591484a3df5bc4a19f4f5400ef6b1cfb7dc45dd99f96cb948748215ed3b5debc34869763c91b8c7a26993fdb9b870950c0743c4d01038ab27c5e4e2
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r-- | src/httpserver.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 2212097754..96bee8640d 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -360,12 +360,8 @@ bool InitHTTPServer() // Redirect libevent's logging to our own log event_set_log_callback(&libevent_log_cb); - // Update libevent's log handling. Returns false if our version of - // libevent doesn't support debug logging, in which case we should - // clear the BCLog::LIBEVENT flag. - if (!UpdateHTTPServerLogging(LogInstance().WillLogCategory(BCLog::LIBEVENT))) { - LogInstance().DisableCategory(BCLog::LIBEVENT); - } + // Update libevent's log handling. + UpdateHTTPServerLogging(LogInstance().WillLogCategory(BCLog::LIBEVENT)); #ifdef WIN32 evthread_use_windows_threads(); @@ -404,18 +400,12 @@ bool InitHTTPServer() return true; } -bool UpdateHTTPServerLogging(bool enable) { -#if LIBEVENT_VERSION_NUMBER >= 0x02010100 +void UpdateHTTPServerLogging(bool enable) { if (enable) { event_enable_debug_logging(EVENT_DBG_ALL); } else { event_enable_debug_logging(EVENT_DBG_NONE); } - return true; -#else - // Can't update libevent logging if version < 02010100 - return false; -#endif } static std::thread g_thread_http; |