Skip to content

Commit

Permalink
Merge pull request #91 from real-or-random/master
Browse files Browse the repository at this point in the history
Check API version of miniupnc
  • Loading branch information
nopslide committed May 28, 2017
2 parents 8d4d21e + 5af19ef commit a1d02ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/libzerocoin/paramgen.cpp
Expand Up @@ -19,6 +19,9 @@ using namespace std;
#include <exception>
#include "Zerocoin.h"

// "Zerocoin.h" includes ../util.h, which redefines printf
#undef printf

#define DEFAULT_MODULUS_SIZE 3072
#define MIN_MODULUS_SIZE 1026

Expand Down
14 changes: 7 additions & 7 deletions src/net.cpp
Expand Up @@ -1079,15 +1079,15 @@ void ThreadMapPort()
struct UPNPDev * devlist = 0;
char lanaddr[64];

#ifndef UPNPDISCOVER_SUCCESS
/* miniupnpc 1.5 */
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
#else
/* miniupnpc 1.6 */
// see apiversions.txt in miniupnpc
#if MINIUPNPC_API_VERSION >= 14
int error = 0;
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
#elif defined UPNPDISCOVER_SUCCESS
int error = 0;
// remove the 2 if you have trouble compiling - I had to add it for miniupnpc 2.0
//devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
#elif
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
#endif

struct UPNPUrls urls;
Expand Down

0 comments on commit a1d02ff

Please sign in to comment.