diff options
author | Matt Corallo <matt@bluematt.me> | 2011-08-12 00:20:07 +0200 |
---|---|---|
committer | Matt Corallo <matt@bluematt.me> | 2011-08-23 13:00:34 -0400 |
commit | b4ada906c03111404c29b115ab37afbad92f4cf1 (patch) | |
tree | 37e382dcb41fbb09a0d49724ec1e55928dd6796e /src/net.cpp | |
parent | 865ed8a1e5c587468a40756d46bcbc1c5a12bb06 (diff) |
Upgrade dependancies and tweak build process.
* Upgrade to use miniupnpc 1.6
* Upgrade to wxWidgets 2.9.2
* Upgrade to Bost 1.47 for Win32 Builds
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/net.cpp b/src/net.cpp index 3953f021e9..c498c40106 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -12,11 +12,6 @@ #ifdef __WXMSW__ #include <string.h> -// This file can be downloaded as a part of the Windows Platform SDK -// and is required for Bitcoin binaries to work properly on versions -// of Windows before XP. If you are doing builds of Bitcoin for -// public release, you should uncomment this line. -//#include <WSPiApi.h> #endif #ifdef USE_UPNP @@ -1079,10 +1074,11 @@ void ThreadMapPort2(void* parg) const char * rootdescurl = 0; const char * multicastif = 0; const char * minissdpdpath = 0; + int error = 0; struct UPNPDev * devlist = 0; char lanaddr[64]; - devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0); + devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error); struct UPNPUrls urls; struct IGDdatas data; @@ -1094,14 +1090,9 @@ void ThreadMapPort2(void* parg) char intClient[16]; char intPort[6]; string strDesc = "Bitcoin " + FormatFullVersion(); - -#ifndef __WXMSW__ - r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, - port, port, lanaddr, strDesc.c_str(), "TCP", 0); -#else r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, port, port, lanaddr, strDesc.c_str(), "TCP", 0, "0"); -#endif + if(r!=UPNPCOMMAND_SUCCESS) printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n", port, port, lanaddr, r, strupnperror(r)); |