summaryrefslogtreecommitdiff
blob: bbe113b9cf473a5bc1def773774149eb72ce0cd3 (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 b88120830e974d843cbfec552b639fa72c64dcbd Mon Sep 17 00:00:00 2001
From: Pavel Vatagin <pavelvat@gmail.com>
Date: Fri, 5 Feb 2016 04:15:33 +0300
Subject: [PATCH] extra: fix #332

---
 extra/upnpc.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/extra/upnpc.cpp b/extra/upnpc.cpp
index 40a011a..bbd7bbf 100644
--- a/extra/upnpc.cpp
+++ b/extra/upnpc.cpp
@@ -41,9 +41,13 @@ using namespace dcpp;
 
 bool UPnPc::init()
 {
-    UPNPDev *devices = upnpDiscover(5000, SettingsManager::getInstance()->isDefault(SettingsManager::BIND_ADDRESS) ? 0 : SETTING(BIND_ADDRESS).c_str(), 0, 0
+    UPNPDev *devices = upnpDiscover(5000, SettingsManager::getInstance()->isDefault(SettingsManager::BIND_ADDRESS) ? 0 : SETTING(BIND_ADDRESS).c_str(), NULL, 0
 #if (MINIUPNPC_API_VERSION >= 8 || defined(MINIUPNPC16))
-                                        , 0, 0);
+                                        , 0
+#if (MINIUPNPC_API_VERSION >= 14)
+                                        , 2
+#endif
+                                        , NULL);
 #else
                                         );
 #endif