Added
Link Here
|
0 |
- |
1 |
diff --git a/libtransmission/port-forwarding-upnp.cc b/libtransmission/port-forwarding-upnp.cc |
|
|
2 |
index 6d7bbc7f7c2..a4146e0df13 100644 |
3 |
--- libtransmission/port-forwarding-upnp.cc |
4 |
+++ libtransmission/port-forwarding-upnp.cc |
5 |
@@ -261,8 +261,13 @@ tr_port_forwarding_state tr_upnpPulse( |
6 |
|
7 |
FreeUPNPUrls(&handle->urls); |
8 |
auto lanaddr = std::array<char, TR_ADDRSTRLEN>{}; |
9 |
- if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1) == |
10 |
- UPNP_IGD_VALID_CONNECTED) |
11 |
+ if ( |
12 |
+#if (MINIUPNPC_API_VERSION >= 18) |
13 |
+ UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1, nullptr, 0) |
14 |
+#else |
15 |
+ UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1) |
16 |
+#endif |
17 |
+ == UPNP_IGD_VALID_CONNECTED) |
18 |
{ |
19 |
tr_logAddInfo(fmt::format(_("Found Internet Gateway Device '{url}'"), fmt::arg("url", handle->urls.controlURL))); |
20 |
tr_logAddInfo(fmt::format(_("Local Address is '{address}'"), fmt::arg("address", lanaddr.data()))); |