mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
The evhttp_connection_get_peer function from libevent changes the type of the second parameter. Fixing the problem.
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config/bitcoin-config.h>
|
||||
#endif
|
||||
|
||||
#include <httpserver.h>
|
||||
|
||||
#include <chainparamsbase.h>
|
||||
@@ -597,7 +601,13 @@ CService HTTPRequest::GetPeer() const
|
||||
// evhttp retains ownership over returned address string
|
||||
const char* address = "";
|
||||
uint16_t port = 0;
|
||||
|
||||
#if HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR
|
||||
evhttp_connection_get_peer(con, &address, &port);
|
||||
#else
|
||||
evhttp_connection_get_peer(con, (char**)&address, &port);
|
||||
#endif // HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR
|
||||
|
||||
peer = LookupNumeric(address, port);
|
||||
}
|
||||
return peer;
|
||||
|
||||
Reference in New Issue
Block a user