Skip to content

Commit 21c406e

Browse files
recursive-rat4luke-jr
authored andcommitted
add support for miniupnpc api version 14
The value of new arg ttl is set to 2 as it's recommended default.
1 parent 13bd5a7 commit 21c406e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/net.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,10 +995,14 @@ void ThreadMapPort()
995995
#ifndef UPNPDISCOVER_SUCCESS
996996
/* miniupnpc 1.5 */
997997
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
998-
#else
998+
#elif MINIUPNPC_API_VERSION < 14
999999
/* miniupnpc 1.6 */
10001000
int error = 0;
10011001
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
1002+
#else
1003+
/* miniupnpc 1.9.20150730 */
1004+
int error = 0;
1005+
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
10021006
#endif
10031007

10041008
struct UPNPUrls urls;

0 commit comments

Comments
 (0)