Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/libymsg.c @ 30607:e9001aa49be8
Very hackily implement a fallback mechanism in Yahoo, but not for Yahoo Japan
because we don't know hosts we can fall back to there yet. This fallback
mechanism just blindly connects to scsa.msg.yahoo.com if the HTTP-based CS
lookup fails. I guarantee this will break in the future. Refs #11986.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sun, 13 Jun 2010 23:07:24 +0000 |
parents | 27aff21c5eea |
children | 50380b60aa56 |
comparison
equal
deleted
inserted
replaced
30606:c3b77c0fa79c | 30607:e9001aa49be8 |
---|---|
3600 | 3600 |
3601 if(error_message != NULL || len == 0) { | 3601 if(error_message != NULL || len == 0) { |
3602 purple_debug_error("yahoo", "Unable to retrieve server info. %" | 3602 purple_debug_error("yahoo", "Unable to retrieve server info. %" |
3603 G_GSIZE_FORMAT " bytes retrieved with error message: %s\n", len, | 3603 G_GSIZE_FORMAT " bytes retrieved with error message: %s\n", len, |
3604 error_message ? error_message : "(null)"); | 3604 error_message ? error_message : "(null)"); |
3605 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, | 3605 |
3606 _("Unable to connect: The server returned an empty response.")); | 3606 if(yahoo_is_japan(a)) { /* We don't know fallback hosts for Yahoo Japan :( */ |
3607 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, | |
3608 _("Unable to connect: The server returned an empty response.")); | |
3609 } else { | |
3610 if(purple_proxy_connect(gc, a, YAHOO_PAGER_HOST_FALLBACK, port, | |
3611 yahoo_got_connected, gc) == NULL) { | |
3612 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, | |
3613 _("Unable to connect")); | |
3614 } | |
3615 } | |
3607 } else { | 3616 } else { |
3608 strings = g_strsplit(url_text, "\r\n", -1); | 3617 strings = g_strsplit(url_text, "\r\n", -1); |
3609 | 3618 |
3610 if((stringslen = g_strv_length(strings)) > 1) { | 3619 if((stringslen = g_strv_length(strings)) > 1) { |
3611 int i; | 3620 int i; |
3627 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, | 3636 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, |
3628 _("Unable to connect")); | 3637 _("Unable to connect")); |
3629 } else { | 3638 } else { |
3630 purple_debug_error("yahoo", "No CS address retrieved! Server " | 3639 purple_debug_error("yahoo", "No CS address retrieved! Server " |
3631 "response:\n%s\n", url_text ? url_text : "(null)"); | 3640 "response:\n%s\n", url_text ? url_text : "(null)"); |
3632 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, | 3641 |
3633 _("Unable to connect: The server's response did not contain " | 3642 if(yahoo_is_japan(a)) { /* We don't know fallback hosts for Yahoo Japan :( */ |
3634 "the necessary information")); | 3643 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, |
3644 _("Unable to connect: The server's response did not contain " | |
3645 "the necessary information")); | |
3646 } else | |
3647 if(purple_proxy_connect(gc, a, YAHOO_PAGER_HOST_FALLBACK, port, | |
3648 yahoo_got_connected, gc) == NULL) { | |
3649 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, | |
3650 _("Unable to connect")); | |
3651 } | |
3635 } | 3652 } |
3636 } | 3653 } |
3637 | 3654 |
3638 g_strfreev(strings); | 3655 g_strfreev(strings); |
3639 g_free(cs_server); | 3656 g_free(cs_server); |