diff options
| author | Gavin Andresen <[email protected]> | 2011-04-12 14:22:12 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2011-04-12 14:22:12 -0400 |
| commit | 79706a8e48a043b9ca83216ba9cbb7413e81710d (patch) | |
| tree | 8da44bcaca6b7a3ce02c589957da284ac8adf9dd /init.cpp | |
| parent | Merge branch 'spentpertxout' of https://github.com/sipa/bitcoin (diff) | |
| parent | Allow UPnP mapping when USE_UPNP is defined and miniupnpc is installed at bui... (diff) | |
| download | discoin-79706a8e48a043b9ca83216ba9cbb7413e81710d.tar.xz discoin-79706a8e48a043b9ca83216ba9cbb7413e81710d.zip | |
Merge branch 'upnp' of https://github.com/TheBlueMatt/bitcoin
Diffstat (limited to 'init.cpp')
| -rw-r--r-- | init.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -159,6 +159,13 @@ bool AppInit2(int argc, char* argv[]) " -addnode=<ip> \t " + _("Add a node to connect to\n") + " -connect=<ip> \t\t " + _("Connect only to the specified node\n") + " -nolisten \t " + _("Don't accept connections from outside\n") + +#ifdef USE_UPNP +#if USE_UPNP + " -noupnp \t " + _("Don't attempt to use UPnP to map the listening port\n") + +#else + " -upnp \t " + _("Attempt to use UPnP to map the listening port\n") + +#endif +#endif " -paytxfee=<amt> \t " + _("Fee per KB to add to transactions you send\n") + #ifdef GUI " -server \t\t " + _("Accept command line and JSON-RPC commands\n") + @@ -456,6 +463,17 @@ bool AppInit2(int argc, char* argv[]) wxMessageBox(_("Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."), "Bitcoin", wxOK | wxICON_EXCLAMATION); } + if (fHaveUPnP) + { +#if USE_UPNP + if (GetBoolArg("-noupnp")) + fUseUPnP = false; +#else + if (GetBoolArg("-upnp")) + fUseUPnP = true; +#endif + } + // // Create the main window and start the node // |