Mercurial > pidgin.yaz
changeset 29987:ff8e865bf524
Attempt to handle transparent proxies that return documents instead of errors.
I think this fixes #11478.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sat, 13 Mar 2010 20:24:52 +0000 |
parents | 1d6b962dea92 |
children | 78f972c7de0e |
files | ChangeLog libpurple/protocols/yahoo/libymsg.c |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Mar 12 22:00:00 2010 +0000 +++ b/ChangeLog Sat Mar 13 20:24:52 2010 +0000 @@ -44,6 +44,10 @@ with content (as opposed to a typing notification, etc). (Thanks to rjoly for testing) + Yahoo: + * Attempt to better handle transparent proxies interfering with HTTP-based + login. + version 2.6.6 (02/18/2010): libpurple: * Fix 'make check' on OS X. (David Fang)
--- a/libpurple/protocols/yahoo/libymsg.c Fri Mar 12 22:00:00 2010 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Sat Mar 13 20:24:52 2010 +0000 @@ -1861,11 +1861,13 @@ totalelements = g_strv_length(split_data); - if(totalelements == 1) + if(totalelements == 1) { response_no = strtol(split_data[0], NULL, 10); - else if(totalelements >= 2) { + } else if(totalelements == 2 || totalelements == 3 ) { response_no = strtol(split_data[0], NULL, 10); token = g_strdup(split_data[1] + strlen("ymsgr=")); + } else { /* It looks like a transparent proxy has returned an invalid document */ + response_no = -1; } g_strfreev(split_data);