Mercurial > pidgin
changeset 21696:fded60f269bc
Don't advertise our presence in avahi on IPv6 or listen for sevices since we don't support receiving connections from or connecting to IPv6 buddies. If someone needs to do that, they can submit a patch. Fixes #4188.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 30 Nov 2007 21:29:18 +0000 |
parents | 52bbf38a1cd2 |
children | 65ef019c000b |
files | libpurple/protocols/bonjour/issues.txt libpurple/protocols/bonjour/jabber.c libpurple/protocols/bonjour/mdns_avahi.c |
diffstat | 3 files changed, 7 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/issues.txt Fri Nov 30 18:58:56 2007 +0000 +++ b/libpurple/protocols/bonjour/issues.txt Fri Nov 30 21:29:18 2007 +0000 @@ -2,5 +2,4 @@ ============= Known issues =============== ========================================== -* File transfers * Typing notifications
--- a/libpurple/protocols/bonjour/jabber.c Fri Nov 30 18:58:56 2007 +0000 +++ b/libpurple/protocols/bonjour/jabber.c Fri Nov 30 21:29:18 2007 +0000 @@ -620,7 +620,7 @@ } memset(&my_addr, 0, sizeof(struct sockaddr_in)); - my_addr.sin_family = PF_INET; + my_addr.sin_family = AF_INET; /* Attempt to find a free port */ bind_successful = FALSE;
--- a/libpurple/protocols/bonjour/mdns_avahi.c Fri Nov 30 18:58:56 2007 +0000 +++ b/libpurple/protocols/bonjour/mdns_avahi.c Fri Nov 30 21:29:18 2007 +0000 @@ -155,7 +155,7 @@ /* Make sure it isn't us */ if (purple_utf8_strcasecmp(name, account->username) != 0) { if (!avahi_service_resolver_new(avahi_service_browser_get_client(b), - interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, + interface, protocol, name, type, domain, AVAHI_PROTO_INET, 0, _resolver_callback, account)) { purple_debug_warning("bonjour", "_browser_callback -- Error initiating resolver: %s\n", avahi_strerror(avahi_client_errno(avahi_service_browser_get_client(b)))); @@ -315,14 +315,14 @@ case PUBLISH_START: publish_result = avahi_entry_group_add_service_strlst( idata->group, AVAHI_IF_UNSPEC, - AVAHI_PROTO_UNSPEC, 0, + AVAHI_PROTO_INET, 0, purple_account_get_username(data->account), ICHAT_SERVICE, NULL, NULL, data->port_p2pj, lst); break; case PUBLISH_UPDATE: publish_result = avahi_entry_group_update_service_txt_strlst( idata->group, AVAHI_IF_UNSPEC, - AVAHI_PROTO_UNSPEC, 0, + AVAHI_PROTO_INET, 0, purple_account_get_username(data->account), ICHAT_SERVICE, NULL, lst); break; @@ -354,7 +354,7 @@ g_return_val_if_fail(idata != NULL, FALSE); - idata->sb = avahi_service_browser_new(idata->client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, ICHAT_SERVICE, NULL, 0, _browser_callback, data->account); + idata->sb = avahi_service_browser_new(idata->client, AVAHI_IF_UNSPEC, AVAHI_PROTO_INET, ICHAT_SERVICE, NULL, 0, _browser_callback, data->account); if (!idata->sb) { purple_debug_error("bonjour", @@ -400,7 +400,7 @@ purple_account_get_username(data->account)); ret = avahi_entry_group_add_record(idata->buddy_icon_group, AVAHI_IF_UNSPEC, - AVAHI_PROTO_UNSPEC, flags, svc_name, + AVAHI_PROTO_INET, flags, svc_name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_NULL, 120, avatar_data, avatar_len); g_free(svc_name); @@ -486,7 +486,7 @@ name = g_strdup_printf("%s." ICHAT_SERVICE "local", buddy->name); idata->buddy_icon_rec_browser = avahi_record_browser_new(session_idata->client, AVAHI_IF_UNSPEC, - AVAHI_PROTO_UNSPEC, name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_NULL, 0, + AVAHI_PROTO_INET, name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_NULL, 0, _buddy_icon_record_cb, buddy); g_free(name);