aboutsummaryrefslogtreecommitdiff
path: root/init.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-04-12 14:22:12 -0400
committerGavin Andresen <gavinandresen@gmail.com>2011-04-12 14:22:12 -0400
commit79706a8e48a043b9ca83216ba9cbb7413e81710d (patch)
tree8da44bcaca6b7a3ce02c589957da284ac8adf9dd /init.cpp
parent2e8b33824f4bd76efd84837335eeb8a025787b4b (diff)
parent8bb5edc1c9054d835ef79c9f1ab3e021b0693303 (diff)
downloadbitcoin-79706a8e48a043b9ca83216ba9cbb7413e81710d.tar.xz
Merge branch 'upnp' of https://github.com/TheBlueMatt/bitcoin
Diffstat (limited to 'init.cpp')
-rw-r--r--init.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/init.cpp b/init.cpp
index 00e64a7a94..effac288fc 100644
--- a/init.cpp
+++ b/init.cpp
@@ -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
//