Mercurial > pidgin.yaz
changeset 29319:362d787f0b87
merge of '4a72c5feaab572105b4902609836cd509328aa6d'
and '89ddd80c4cd11b79fbcb649bba819ecce526312c'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 01 Feb 2010 21:51:20 +0000 |
parents | 61e2537722e0 (diff) ed93baed53c2 (current diff) |
children | 508b73ce9b14 |
files | pidgin/gtkthemes.c |
diffstat | 3 files changed, 19 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Feb 01 21:50:17 2010 +0000 +++ b/ChangeLog Mon Feb 01 21:51:20 2010 +0000 @@ -31,6 +31,8 @@ offline. * Wrap XHTML messages in <p>, as described in XEP-0071, for compatibility with some clients. + * Don't do an SRV lookup for a STUN server associated with the account + if one is already set globally in prefs. Yahoo: * Don't send <span> and </span> tags. (Fartash Faghri)
--- a/libpurple/protocols/jabber/disco.c Mon Feb 01 21:50:17 2010 +0000 +++ b/libpurple/protocols/jabber/disco.c Mon Feb 01 21:51:20 2010 +0000 @@ -22,6 +22,7 @@ */ #include "internal.h" +#include "network.h" #include "prefs.h" #include "debug.h" #include "request.h" @@ -534,8 +535,12 @@ js->googletalk = TRUE; /* autodiscover stun and relays */ - jabber_google_send_jingle_info(js); - } else { + if (purple_network_get_stun_ip() == NULL || + purple_strequal(purple_network_get_stun_ip(), "")) { + jabber_google_send_jingle_info(js); + } + } else if (purple_network_get_stun_ip() == NULL || + purple_strequal(purple_network_get_stun_ip(), "")) { js->srv_query_data = purple_srv_resolve("stun", "udp", js->user->domain, jabber_disco_stun_srv_resolve_cb, js);
--- a/pidgin/gtkthemes.c Mon Feb 01 21:50:17 2010 +0000 +++ b/pidgin/gtkthemes.c Mon Feb 01 21:51:20 2010 +0000 @@ -263,14 +263,7 @@ if (buf[0] == '#' || buf[0] == '\0') continue; - else { - int len = strlen(buf); - while (len && (buf[len - 1] == '\r' || buf[len - 1] == '\n')) - buf[--len] = '\0'; - if (len == 0) - continue; - } - + i = buf; while (isspace(*i)) i++; @@ -287,17 +280,25 @@ list->smileys = g_slist_reverse(list->smileys); list = child; } else if (!g_ascii_strncasecmp(i, "Name=", strlen("Name="))) { + int len; g_free(theme->name); theme->name = g_strdup(i + strlen("Name=")); + len = strlen(theme->name); + theme->name[len-1] = 0; + if(len > 2 && theme->name[len-2] == '\r') + theme->name[len-2] = 0; } else if (!g_ascii_strncasecmp(i, "Description=", strlen("Description="))) { g_free(theme->desc); theme->desc = g_strdup(i + strlen("Description=")); + theme->desc[strlen(theme->desc)-1] = 0; } else if (!g_ascii_strncasecmp(i, "Icon=", strlen("Icon="))) { g_free(theme->icon); theme->icon = g_build_filename(dirname, i + strlen("Icon="), NULL); + theme->icon[strlen(theme->icon)-1] = 0; } else if (!g_ascii_strncasecmp(i, "Author=", strlen("Author="))) { g_free(theme->author); theme->author = g_strdup(i + strlen("Author=")); + theme->author[strlen(theme->author)-1] = 0; } else if (load && list) { gboolean hidden = FALSE; char *sfile = NULL; @@ -310,7 +311,7 @@ char l[64]; int li = 0; while (*i && !isspace(*i) && li < sizeof(l) - 1) { - if (*i == '\\' && *(i+1) != '\0') + if (*i == '\\' && *(i+1) != '\0' && *(i+1) != '\n' && *(i+1) != '\r') i++; l[li++] = *(i++); }