mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 21:22:47 +01:00
net: Have LookupNumeric return a CService directly
Also fix up a few small issues: - Lookup with "badip:port" now sets the port to 0 - Don't allow assert to have side-effects
This commit is contained in:
@@ -619,7 +619,7 @@ CService HTTPRequest::GetPeer()
|
||||
const char* address = "";
|
||||
uint16_t port = 0;
|
||||
evhttp_connection_get_peer(con, (char**)&address, &port);
|
||||
LookupNumeric(address, peer, port);
|
||||
peer = LookupNumeric(address, port);
|
||||
}
|
||||
return peer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user