Skip to content

Commit 9f3e48e

Browse files
add support for miniupnpc api version 14
The value of new arg ttl is set to 2 as it's recommended default.
1 parent 49793fb commit 9f3e48e

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
@@ -1120,10 +1120,14 @@ void ThreadMapPort()
11201120
#ifndef UPNPDISCOVER_SUCCESS
11211121
/* miniupnpc 1.5 */
11221122
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
1123-
#else
1123+
#elif MINIUPNPC_API_VERSION < 14
11241124
/* miniupnpc 1.6 */
11251125
int error = 0;
11261126
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
1127+
#else
1128+
/* miniupnpc 1.9.20150730 */
1129+
int error = 0;
1130+
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
11271131
#endif
11281132

11291133
struct UPNPUrls urls;

0 commit comments

Comments
 (0)