libpurple/network.c

changeset 41828
023b57b090f6
parent 41741
83b658257a8a
child 41840
fe350460fb1c
--- a/libpurple/network.c	Sun Oct 23 22:21:46 2022 -0500
+++ b/libpurple/network.c	Sun Oct 23 22:31:02 2022 -0500
@@ -46,7 +46,6 @@
 #include "network.h"
 #include "prefs.h"
 #include "stun.h"
-#include "upnp.h"
 
 static gboolean force_online = FALSE;
 
@@ -134,12 +133,6 @@
 		return;
 	}
 
-	/* Attempt to get the IP from a NAT device using UPnP */
-	ip = purple_upnp_get_public_ip();
-	if (ip != NULL) {
-		return;
-	}
-
 	/* Attempt to get the IP from a NAT device using NAT-PMP */
 	ip = purple_pmp_get_public_ip();
 	if (ip != NULL) {
@@ -167,12 +160,6 @@
 			return g_strdup(stun->publicip);
 		}
 
-		/* Attempt to get the IP from a NAT device using UPnP */
-		ip = purple_upnp_get_public_ip();
-		if (ip != NULL) {
-			return g_strdup(ip);
-		}
-
 		/* Attempt to get the IP from a NAT device using NAT-PMP */
 		ip = purple_pmp_get_public_ip();
 		if (ip != NULL) {
@@ -325,11 +312,7 @@
 	purple_prefs_add_int   ("/purple/network/ports_range_start", 1024);
 	purple_prefs_add_int   ("/purple/network/ports_range_end", 2048);
 
-	if(purple_prefs_get_bool("/purple/network/map_ports") || purple_prefs_get_bool("/purple/network/auto_ip"))
-		purple_upnp_discover(NULL, NULL);
-
 	purple_pmp_init();
-	purple_upnp_init();
 
 	purple_network_set_stun_server(
 		purple_prefs_get_string("/purple/network/stun_server"));
@@ -342,9 +325,4 @@
 {
 	g_free(stun_ip);
 	g_free(turn_ip);
-
-	/* TODO: clean up remaining port mappings, note calling
-	 purple_upnp_remove_port_mapping from here doesn't quite work... */
-
-	purple_upnp_uninit();
 }

mercurial