aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-05-13 01:26:14 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-05-13 01:26:14 +0200
commit5a3cb32e5942adbfb5af90808013c1dde3c03fcf (patch)
tree91e93cba67ad9a600f18589b2ac25f2b80bc4064 /src/net.cpp
parent139d2f7c294c2489151b0b5df9b5351aaeaffa97 (diff)
Take -port into account when resolving -bind's
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 53b69d2769..951595e680 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) */