# HG changeset patch # User Paul Aurich # Date 1253850109 0 # Node ID a143b7fcff4c90b30497b7023641bc531ae584a8 # Parent 8aa24fd75490d4b778b1d9d58d8e56b13abd09c0# Parent 578b4048a501ad458a3f5cb2c74e2aed96d4dac2 merge of '363fb1f7fa72426b9e239a320bd53c6bd59f57f9' and 'ff8f05c45f3ff64c9fa0b6cfeaa6c7e44983bf38' diff -r 8aa24fd75490 -r a143b7fcff4c COPYRIGHT --- a/COPYRIGHT Thu Sep 24 20:38:30 2009 +0000 +++ b/COPYRIGHT Fri Sep 25 03:41:49 2009 +0000 @@ -275,6 +275,7 @@ Lokheed Norberto Lopes Shlomi Loubaton +Brian Lu Uli Luckas Matthew Luckie Marcus Lundblad diff -r 8aa24fd75490 -r a143b7fcff4c ChangeLog --- a/ChangeLog Thu Sep 24 20:38:30 2009 +0000 +++ b/ChangeLog Fri Sep 25 03:41:49 2009 +0000 @@ -3,10 +3,15 @@ version 2.6.3 (??/??/20??): XMPP: * Fix a crash when attempting to validate an invalid JID. + * Resolve an issue when connecting to iChat Server when no resource + is specified. + * Fix a crash when adding a buddy without an '@'. General: * New 'plugins' sub-command to 'debug' command (i.e. '/debug plugins') to announce the list of loaded plugins (in both Finch and Pidgin). + * Fix a crash when performing DNS queries on Unixes that use the + blocking DNS lookups. (Brian Lu) version 2.6.2 (09/05/2009): libpurple: diff -r 8aa24fd75490 -r a143b7fcff4c libpurple/dnsquery.c --- a/libpurple/dnsquery.c Thu Sep 24 20:38:30 2009 +0000 +++ b/libpurple/dnsquery.c Fri Sep 25 03:41:49 2009 +0000 @@ -918,7 +918,6 @@ PurpleDnsQueryData *query_data; struct sockaddr_in sin; GSList *hosts = NULL; - char *hostname; query_data = data; query_data->timeout = 0; @@ -931,6 +930,7 @@ if (!inet_aton(query_data->hostname, &sin.sin_addr)) { struct hostent *hp; + gchar *hostname; #ifdef USE_IDN if (!dns_str_is_ascii(query_data->hostname)) { int ret = purple_network_convert_idn_to_ascii(query_data->hostname, @@ -956,11 +956,11 @@ memset(&sin, 0, sizeof(struct sockaddr_in)); memcpy(&sin.sin_addr.s_addr, hp->h_addr, hp->h_length); sin.sin_family = hp->h_addrtype; + g_free(hostname); } else sin.sin_family = AF_INET; sin.sin_port = htons(query_data->port); - g_free(hostname); hosts = g_slist_append(hosts, GINT_TO_POINTER(sizeof(sin))); hosts = g_slist_append(hosts, g_memdup(&sin, sizeof(sin))); diff -r 8aa24fd75490 -r a143b7fcff4c libpurple/protocols/jabber/auth.c --- a/libpurple/protocols/jabber/auth.c Thu Sep 24 20:38:30 2009 +0000 +++ b/libpurple/protocols/jabber/auth.c Fri Sep 25 03:41:49 2009 +0000 @@ -692,7 +692,8 @@ JabberIq *iq; xmlnode *query, *username; - /* We can end up here without encryption if the server doesn't support + /* + * We can end up here without encryption if the server doesn't support * and we're not using old-style SSL. If the user * is requiring SSL/TLS, we need to enforce it. */ @@ -704,6 +705,16 @@ return; } + /* + * IQ Auth doesn't have support for resource binding, so we need to pick a + * default resource so it will work properly. jabberd14 throws an error and + * iChat server just fails silently. + */ + if (!js->user->resource || *js->user->resource == '\0') { + g_free(js->user->resource); + js->user->resource = g_strdup("Home"); + } + #ifdef HAVE_CYRUS_SASL /* If we have Cyrus SASL, then passwords will have been set * to OPTIONAL for this protocol. So, we need to do our own diff -r 8aa24fd75490 -r a143b7fcff4c libpurple/protocols/jabber/chat.c --- a/libpurple/protocols/jabber/chat.c Thu Sep 24 20:38:30 2009 +0000 +++ b/libpurple/protocols/jabber/chat.c Fri Sep 25 03:41:49 2009 +0000 @@ -99,6 +99,9 @@ { JabberChat *chat = NULL; + g_return_val_if_fail(room != NULL, NULL); + g_return_val_if_fail(server != NULL, NULL); + if(NULL != js->chats) { char *room_jid = g_strdup_printf("%s@%s", room, server); diff -r 8aa24fd75490 -r a143b7fcff4c libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Thu Sep 24 20:38:30 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Fri Sep 25 03:41:49 2009 +0000 @@ -1593,15 +1593,6 @@ if(js->protocol_version == JABBER_PROTO_0_9 && js->registration) { jabber_register_start(js); } else if(js->auth_type == JABBER_AUTH_IQ_AUTH) { - /* with dreamhost's xmpp server at least, you have to - specify a resource or you will get a "406: Not - Acceptable" - */ - if(!js->user->resource || *js->user->resource == '\0') { - g_free(js->user->resource); - js->user->resource = g_strdup("Home"); - } - jabber_auth_start_old(js); } break; diff -r 8aa24fd75490 -r a143b7fcff4c libpurple/protocols/jabber/roster.c --- a/libpurple/protocols/jabber/roster.c Thu Sep 24 20:38:30 2009 +0000 +++ b/libpurple/protocols/jabber/roster.c Fri Sep 25 03:41:49 2009 +0000 @@ -354,7 +354,7 @@ } /* Adding a chat room or a chat buddy to the roster is *not* supported. */ - if (jabber_chat_find(js, jid->node, jid->domain) != NULL) { + if (jid->node && jabber_chat_find(js, jid->node, jid->domain) != NULL) { /* * This is the same thing Bonjour does. If it causes problems, move * it to an idle callback.