mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
The evhttp_connection_get_peer function from libevent changes the type of the second parameter. Fixing the problem.
This commit is contained in:
parent
e7507f333b
commit
091ccc38c2
2 changed files with 21 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue