diff libpurple/stun.c @ 32815:3d6528f36877

propagate from branch 'im.pidgin.pidgin.2.x.y' (head 5ca378b115ef36cfafb203fb88623734a7c6bb23) to branch 'im.pidgin.pidgin' (head ccfb262bb9e313a5281f05015530ef94fc58a573)
author Paul Aurich <paul@darkrain42.org>
date Thu, 31 May 2012 03:48:16 +0000
parents 804239d704ff
children
line wrap: on
line diff
--- a/libpurple/stun.c	Thu May 31 03:45:21 2012 +0000
+++ b/libpurple/stun.c	Thu May 31 03:48:16 2012 +0000
@@ -174,6 +174,8 @@
 	struct ifreq *ifr;
 	struct sockaddr_in *sinptr;
 
+	memset(&in, 0, sizeof(in));
+
 	len = recv(source, buffer, sizeof(buffer) - 1, 0);
 	if (!len) {
 		purple_debug_warning("stun", "unable to read stun response\n");
@@ -338,7 +340,7 @@
 		return;
 	}
 
-	if (!purple_network_listen_range(12108, 12208, SOCK_DGRAM, hbn_listen_cb, hosts)) {
+	if (!purple_network_listen_range(12108, 12208, AF_UNSPEC, SOCK_DGRAM, TRUE, hbn_listen_cb, hosts)) {
 		while (hosts) {
 			hosts = g_slist_delete_link(hosts, hosts);
 			g_free(hosts->data);
@@ -365,7 +367,7 @@
 	purple_debug_info("stun", "got %d SRV responses, server: %s, port: %d\n",
 		results, servername, port);
 
-	purple_dnsquery_a_account(NULL, servername, port, hbn_cb, NULL);
+	purple_dnsquery_a(NULL, servername, port, hbn_cb, NULL);
 	g_free(resp);
 }
 
@@ -424,7 +426,7 @@
 	nattype.servername = g_strdup(servername);
 
 	callbacks = g_slist_append(callbacks, cb);
-	purple_srv_resolve_account(NULL, "stun", "udp", servername, do_test1,
+	purple_srv_resolve(NULL, "stun", "udp", servername, do_test1,
 		(gpointer) servername);
 
 	return &nattype;