Package: sushi / 1.4.0+git20160822+dfsg-4.1

miniupnpc-api-14.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description:  Add fix for MINIUPNPC_API_VERSION 14
 thanks to nanard for the suggestion
 that the patch is based on.
Author: Peter Michael Green <plugwash@debian.org>
Bug-Debian: https://bugs.debian.org/889055

--- sushi-1.4.0+git20160822+dfsg.orig/maki/source/plugins/upnp.c
+++ sushi-1.4.0+git20160822+dfsg/maki/source/plugins/upnp.c
@@ -267,8 +267,11 @@ init (void)
 		gchar addr[64] = { '\0' };
 #ifdef HAVE_MINIUPNPC_16
 		gint error;
-
+#if defined(MINIUPNPC_API_VERSION) && (MINIUPNPC_API_VERSION >= 14)
+		miniupnpc_dev = upnpDiscover(1000, NULL, NULL, 0, 0, 2, &error); /* use default TTL of 2 */
+#else
 		miniupnpc_dev = upnpDiscover(1000, NULL, NULL, 0, 0, &error);
+#endif
 #else
 		miniupnpc_dev = upnpDiscover(1000, NULL, NULL, 0);
 #endif