summaryrefslogtreecommitdiff
blob: 377286220b11403d9f0ebeebb3448e18ae4f33b1 (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
Index: common/i_net.cpp
===================================================================
--- a/common/i_net.cpp	(revision 5459)
+++ b/common/i_net.cpp	(working copy)
@@ -151,7 +151,11 @@
 
 	Printf(PRINT_HIGH, "UPnP: Discovering router (max 1 unit supported)\n");
 
+#if MINIUPNPC_API_VERSION < 14
 	devlist = upnpDiscover(sv_upnp_discovertimeout.asInt(), NULL, NULL, 0, 0, &res);
+#else
+	devlist = upnpDiscover(sv_upnp_discovertimeout.asInt(), NULL, NULL, 0, 0, 2, &res);
+#endif
 
 	if (!devlist || res != UPNPDISCOVER_SUCCESS)
     {
@@ -179,7 +183,11 @@
       //      " desc: %s\n st: %s\n",
         //    dev->descURL, dev->st);
 
+#if MINIUPNPC_API_VERSION < 16
     descXML = (char *)miniwget(dev->descURL, &descXMLsize, 0);
+#else
+    descXML = (char *)miniwget(dev->descURL, &descXMLsize, 0, &res);
+#endif
 
     if (descXML)
     {