[Pkg-bitcoin-commits] [bitcoin] 117/126: rpc: further constrain the libevent workaround

Jonas Smedegaard dr at jones.dk
Mon Nov 13 20:03:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.15.1_dfsg-1
in repository bitcoin.

commit 8195cb0d7fc4f8699b35aff7a43ed2fb3013608c
Author: Cory Fields <cory-nospam- at coryfields.com>
Date:   Thu Nov 2 14:37:33 2017 -0400

    rpc: further constrain the libevent workaround
    
    The bug was introduced in 2.1.6-beta, versions before that don't need the
    workaround.
    
    Github-Pull: #11593
    Rebased-From: 97932cd2689659addfbb58dc6148928b73af3bd0
---
 src/httpserver.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index a3a9008..dc7016b 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -241,7 +241,7 @@ static std::string RequestMethodString(HTTPRequest::RequestMethod m)
 static void http_request_cb(struct evhttp_request* req, void* arg)
 {
     // Disable reading to work around a libevent bug, fixed in 2.2.0.
-    if (event_get_version_number() < 0x02020001) {
+    if (event_get_version_number() >= 0x02010600 && event_get_version_number() < 0x02020001) {
         evhttp_connection* conn = evhttp_request_get_connection(req);
         if (conn) {
             bufferevent* bev = evhttp_connection_get_bufferevent(conn);
@@ -615,7 +615,7 @@ void HTTPRequest::WriteReply(int nStatus, const std::string& strReply)
         evhttp_send_reply(req_copy, nStatus, nullptr, nullptr);
         // Re-enable reading from the socket. This is the second part of the libevent
         // workaround above.
-        if (event_get_version_number() < 0x02020001) {
+        if (event_get_version_number() >= 0x02010600 && event_get_version_number() < 0x02020001) {
             evhttp_connection* conn = evhttp_request_get_connection(req_copy);
             if (conn) {
                 bufferevent* bev = evhttp_connection_get_bufferevent(conn);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/bitcoin.git



More information about the Pkg-bitcoin-commits mailing list