changeset 30982:fcb8fad4f029

Specify an IPv6 scope on the IP address being used to reference a Bonjour Buddy. Thanks goes to Antonio Ospite for figuring out that this needs to be done. Fixes #12629
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 17 Sep 2010 14:32:31 +0000
parents 3b6106598b13
children 47ea27481972
files libpurple/protocols/bonjour/mdns_avahi.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/mdns_avahi.c	Thu Sep 16 02:25:56 2010 +0000
+++ b/libpurple/protocols/bonjour/mdns_avahi.c	Fri Sep 17 14:32:31 2010 +0000
@@ -188,12 +188,14 @@
 					bb->ips = g_slist_remove(bb->ips, rd->ip);
 					g_free((gchar *) rd->ip);
 				}
-				rd->ip = g_strdup(ip);
 				/* 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)
+				if (protocol == AVAHI_PROTO_INET6) {
+					rd->ip = g_strdup_printf("%s%%%d", ip, interface);
 					bb->ips = g_slist_prepend(bb->ips, (gchar *) rd->ip);
-				else
+				} else {
+					rd->ip = g_strdup(ip);
 					bb->ips = g_slist_append(bb->ips, (gchar *) rd->ip);
+				}
 			}
 
 			bb->port_p2pj = port;