diff libpurple/protocols/bonjour/mdns_avahi.c @ 32369:d6cc1ff0d9b7

Append interface ID only to local interfaces for IPv6 Bonjour. This should fix unsuccessful connection attempts both for two IPv6 hosts with a non-link-local address next to the link-local one or without. committer: Ethan Blanton <elb@pidgin.im>
author linus.luessing@web.de
date Wed, 30 Nov 2011 00:58:50 +0000
parents 9c8b28dc6656
children 0734b9c8c345
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/mdns_avahi.c	Tue Nov 29 03:58:50 2011 +0000
+++ b/libpurple/protocols/bonjour/mdns_avahi.c	Wed Nov 30 00:58:50 2011 +0000
@@ -179,6 +179,9 @@
 			ip[0] = '\0';
 			avahi_address_snprint(ip, AVAHI_ADDRESS_STR_MAX, a);
 
+			if (protocol == AVAHI_PROTO_INET6)
+				append_iface_if_linklocal(ip, interface);
+
 			purple_debug_info("bonjour", "_resolve_callback - name:%s ip:%s prev_ip:%s\n",
 				name, ip, rd->ip);
 
@@ -190,7 +193,7 @@
 				}
 				/* IPv6 goes at the front of the list and IPv4 at the end so that we "prefer" IPv6, if present */
 				if (protocol == AVAHI_PROTO_INET6) {
-					rd->ip = g_strdup_printf("%s%%%d", ip, interface);
+					rd->ip = g_strdup_printf("%s", ip);
 					bb->ips = g_slist_prepend(bb->ips, (gchar *) rd->ip);
 				} else {
 					rd->ip = g_strdup(ip);