summarylogtreecommitdiffstats
path: root/0001-Support-miniupnpc-version-1.9.20150730.patch
blob: 07da695a2ea0678e61834c3cd666290f085f1700 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From cdd4942e035a9dcddc1918ccb418affb056d6128 Mon Sep 17 00:00:00 2001
From: Calle Laakkonen <laakkonenc@gmail.com>
Date: Wed, 30 Sep 2015 21:14:56 +0300
Subject: [PATCH] Support miniupnpc version 1.9.20150730

Issue #273
---
 src/client/net/upnp.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/client/net/upnp.cpp b/src/client/net/upnp.cpp
index f31c972..543432a 100644
--- a/src/client/net/upnp.cpp
+++ b/src/client/net/upnp.cpp
@@ -92,7 +92,11 @@ bool UPnPClient::doDiscover()
 		return true;
 
 	int error;
+#if MINIUPNPC_API_VERSION < 14
 	d->devices = upnpDiscover(2000, nullptr, nullptr, 0, 0, &error);
+#else
+	d->devices = upnpDiscover(2000, nullptr, nullptr, 0, 0, 2, &error);
+#endif
 	if(!d->devices) {
 		qWarning("UPnP: Error (%d) discovering devices!", error);
 		return false;
-- 
2.6.2