Xjail/Spartancoin Project

Check-in [dd5b35169d]
Login
Overview
Comment:use MINIUPNPC_API_VERSION
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:dd5b35169da6e2bf05c56ec36ad59b2860691e7f989c2834ab6d0d3b1925276c
User & Date: xjail 2017-11-08 04:28:09
Context
2018-02-09
06:57
expose added node IPs check-in: 1cd24ddfd5 user: xjail tags: master, trunk
2017-11-08
04:28
use MINIUPNPC_API_VERSION check-in: dd5b35169d user: xjail tags: master, trunk
01:55
change BOOST_FOREACH to c++11 range-based for check-in: e7ba647401 user: xjail tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/net.cpp.

1077
1078
1079
1080
1081
1082
1083
1084
1085




1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
    std::string port = strprintf("%u", GetListenPort());
    const char * multicastif = 0;
    const char * minissdpdpath = 0;
    struct UPNPDev * devlist = 0;
    char lanaddr[64];

#ifndef UPNPDISCOVER_SUCCESS
    /* miniupnpc 1.5 */
    devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);




#else
    /* miniupnpc 1.6 and above */
    int error = 0;
    devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 0, &error);
#endif

    struct UPNPUrls urls;
    struct IGDdatas data;
    int r;

    r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));







|
|
>
>
>
>

|
|
|







1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
    std::string port = strprintf("%u", GetListenPort());
    const char * multicastif = 0;
    const char * minissdpdpath = 0;
    struct UPNPDev * devlist = 0;
    char lanaddr[64];

#ifndef UPNPDISCOVER_SUCCESS
	/* miniupnpc 1.5 */
	devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
#elif MINIUPNPC_API_VERSION < 14
	/* miniupnpc 1.6 and above */
	int error = 0;
	devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
#else
	/* miniupnpc 2.0 and above */
	int error = 0;
	devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
#endif

    struct UPNPUrls urls;
    struct IGDdatas data;
    int r;

    r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));