diff options
author | Witchspace <witchspace81@gmail.com> | 2010-12-22 14:08:00 +0100 |
---|---|---|
committer | Witchspace <witchspace81@gmail.com> | 2010-12-22 14:08:00 +0100 |
commit | 5f88e8887a31db68493334fc8e5652c5dd9cbf89 (patch) | |
tree | cc723c7d3424b54e06a7f50d96cd7af417e97d65 /init.cpp | |
parent | 2d96276e243c93add0b0d292ae9f05a54508b6e7 (diff) |
add -nolisten command line option
Diffstat (limited to 'init.cpp')
-rw-r--r-- | init.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -181,7 +181,8 @@ bool AppInit2(int argc, char* argv[]) " -rpcpassword=<pw>\t " + _("Password for JSON-RPC connections\n") + " -rpcport=<port> \t\t " + _("Listen for JSON-RPC connections on <port>\n") + " -rpcallowip=<ip> \t\t " + _("Allow JSON-RPC connections from specified IP address\n") + - " -rpcconnect=<ip> \t " + _("Send commands to node running on <ip>\n"); + " -rpcconnect=<ip> \t " + _("Send commands to node running on <ip>\n") + + " -nolisten \t " + _("Don't accept connections from outside"); #ifdef USE_SSL strUsage += string() + @@ -211,6 +212,8 @@ bool AppInit2(int argc, char* argv[]) fPrintToDebugger = GetBoolArg("-printtodebugger"); fTestNet = GetBoolArg("-testnet"); + + fNoListen = GetBoolArg("-nolisten"); if (fCommandLine) { @@ -290,10 +293,13 @@ bool AppInit2(int argc, char* argv[]) // Bind to the port early so we can tell if another instance is already running. string strErrors; - if (!BindListenPort(strErrors)) + if (!fNoListen) { - wxMessageBox(strErrors, "Bitcoin"); - return false; + if (!BindListenPort(strErrors)) + { + wxMessageBox(strErrors, "Bitcoin"); + return false; + } } // |