From 5a3cb32e5942adbfb5af90808013c1dde3c03fcf Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sun, 13 May 2012 01:26:14 +0200 Subject: Take -port into account when resolving -bind's --- src/net.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/net.cpp') diff --git a/src/net.cpp b/src/net.cpp index 53b69d276..951595e68 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -231,11 +231,9 @@ bool AddLocal(const CService& addr, int nScore) return true; } -bool AddLocal(const CNetAddr& addr, int nScore, int port) +bool AddLocal(const CNetAddr &addr, int nScore) { - if (port == -1) - port = GetListenPort(); - return AddLocal(CService(addr, port), nScore); + return AddLocal(CService(addr, GetListenPort()), nScore); } /** Make a particular network entirely off-limits (no automatic connects to it) */ -- cgit v1.2.3