Merge bitcoin/bitcoin#22914: util: remove libevent <= 2.0.18 back-compat code
6045a14642util: remove libevent <= 2.0.18 back-compat code (fanquake) Pull request description: Now that we require libevent >=2.0.21, remove backwards compatibility code for older versions. ACKs for top commit: kristapsk: ACK6045a14642Tree-SHA512: 49a237ee3cef78b105f8ea91dc3e541fe700fe3a3d02a88f85ec91772068ffbe508dbe196a4d693399b2bcf903251b9bc2573f04cb8f2e21a2ea481f35bfde32
This commit is contained in:
2 files changed
-7
No files matched your search
@@ -93,9 +93,6 @@ static void SetupCliArgs(ArgsManager& argsman)
|
|||||||
/** libevent event log callback */
|
/** libevent event log callback */
|
||||||
static void libevent_log_cb(int severity, const char *msg)
|
static void libevent_log_cb(int severity, const char *msg)
|
||||||
{
|
{
|
||||||
#ifndef EVENT_LOG_ERR // EVENT_LOG_ERR was added in 2.0.19; but before then _EVENT_LOG_ERR existed.
|
|
||||||
# define EVENT_LOG_ERR _EVENT_LOG_ERR
|
|
||||||
#endif
|
|
||||||
// Ignore everything other than errors
|
// Ignore everything other than errors
|
||||||
if (severity >= EVENT_LOG_ERR) {
|
if (severity >= EVENT_LOG_ERR) {
|
||||||
throw std::runtime_error(strprintf("libevent error: %s", msg));
|
throw std::runtime_error(strprintf("libevent error: %s", msg));
|
||||||
|
|||||||
@@ -338,10 +338,6 @@ static void HTTPWorkQueueRun(WorkQueue<HTTPClosure>* queue, int worker_num)
|
|||||||
/** libevent event log callback */
|
/** libevent event log callback */
|
||||||
static void libevent_log_cb(int severity, const char *msg)
|
static void libevent_log_cb(int severity, const char *msg)
|
||||||
{
|
{
|
||||||
#ifndef EVENT_LOG_WARN
|
|
||||||
// EVENT_LOG_WARN was added in 2.0.19; but before then _EVENT_LOG_WARN existed.
|
|
||||||
# define EVENT_LOG_WARN _EVENT_LOG_WARN
|
|
||||||
#endif
|
|
||||||
if (severity >= EVENT_LOG_WARN) // Log warn messages and higher without debug category
|
if (severity >= EVENT_LOG_WARN) // Log warn messages and higher without debug category
|
||||||
LogPrintf("libevent: %s\n", msg);
|
LogPrintf("libevent: %s\n", msg);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user