aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-05-14 17:40:08 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-05-14 17:52:50 +0200
commit55bb0cfbb6841372e4969b598f04dfc15a7687c0 (patch)
treeef36593b7a530137c602017d949285c7c0301d21
parent0f1707de678a23b8600510be366289071203fc6e (diff)
downloadbitcoin-55bb0cfbb6841372e4969b598f04dfc15a7687c0.tar.xz
Allow binding to the any address, and report failure
-rw-r--r--src/init.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp
index f1599ed3a5..81a414a71d 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -611,8 +611,8 @@ bool AppInit2()
std::string strError;
if (mapArgs.count("-bind")) {
BOOST_FOREACH(std::string strBind, mapMultiArgs["-bind"]) {
- CService addrBind(strBind, GetListenPort(), false);
- if (!addrBind.IsValid())
+ CService addrBind;
+ if (!Lookup(strBind.c_str(), addrBind, GetListenPort(), false))
return InitError(strprintf(_("Cannot resolve -bind address: '%s'"), strBind.c_str()));
fBound |= Bind(addrBind);
}
@@ -625,7 +625,7 @@ bool AppInit2()
#endif
}
if (!fBound)
- return false;
+ return InitError(_("Not listening on any port"));
}
if (mapArgs.count("-externalip"))