summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-07-22 14:07:08 (GMT)
committerKevin Smith <kevin.smith@isode.com>2016-07-22 15:04:37 (GMT)
commitf0e513b179d1b04c0e16537886b0dc5215537279 (patch)
treea8cc05766236193f7e541387b7ab9c98fc11bb33
parentcf12f1580d4ddc491a53927e7adf1a94df6e2e05 (diff)
downloadswift-f0e513b179d1b04c0e16537886b0dc5215537279.zip
swift-f0e513b179d1b04c0e16537886b0dc5215537279.tar.bz2
Add support for libminiupnpc version 2
Test-Information: Build successfully on openSUSE Tumbleweed which only has libminiupnpc 2.0 as package. Unit tests passed. Change-Id: I650e1224014162b55cdf64df7e72466b52dc3ade
-rw-r--r--Swiften/Network/MiniUPnPInterface.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swiften/Network/MiniUPnPInterface.cpp b/Swiften/Network/MiniUPnPInterface.cpp
index b2afd88..94305b9 100644
--- a/Swiften/Network/MiniUPnPInterface.cpp
+++ b/Swiften/Network/MiniUPnPInterface.cpp
@@ -35,7 +35,11 @@ struct MiniUPnPInterface::Private {
MiniUPnPInterface::MiniUPnPInterface() : p(std::make_shared<Private>()) {
p->isValid = false;
int error = 0;
+#if MINIUPNPC_API_VERSION > 14
+ p->deviceList = upnpDiscover(1500 /* timeout in ms */, nullptr, nullptr, 0, 0 /* do IPv6? */, 2 /* default TTL */, &error);
+#else
p->deviceList = upnpDiscover(1500 /* timeout in ms */, nullptr, nullptr, 0, 0 /* do IPv6? */, &error);
+#endif
if (!p->deviceList) {
return;
}