message: Check API version of miniupnc
diff: @@ -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;
  