# HG changeset patch # User Mark Doliner # Date 1180905540 0 # Node ID df788cd5359601d12eaac0a0bced88e226f1a8db # Parent 648551e3243a0732cab6c202bdcbb718ab7816fa Better error messages for Yahoo! login failures diff -r 648551e3243a -r df788cd53596 libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Sun Jun 03 19:04:22 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Sun Jun 03 21:19:00 2007 +0000 @@ -2310,7 +2310,7 @@ * are you trying to pull? */ guchar *start; - purple_debug_warning("yahoo", "Error in YMSG stream, got something not a YMSG packet!"); + purple_debug_warning("yahoo", "Error in YMSG stream, got something not a YMSG packet!\n"); start = memchr(yd->rxqueue + 1, 'Y', yd->rxlen - 1); if (start) { @@ -2377,7 +2377,11 @@ } if (source < 0) { - purple_connection_error(gc, _("Unable to connect.")); + gchar *tmp; + tmp = g_strdup_printf(_("Could not establish a connection with the server:\n%s"), + error_message); + purple_connection_error(gc, tmp); + g_free(tmp); return; } @@ -2405,7 +2409,11 @@ } if (source < 0) { - purple_connection_error(gc, _("Unable to connect.")); + gchar *tmp; + tmp = g_strdup_printf(_("Could not establish a connection with the server:\n%s"), + error_message); + purple_connection_error(gc, tmp); + g_free(tmp); return; } @@ -2507,12 +2515,16 @@ if (written < 0 && errno == EAGAIN) written = 0; else if (written <= 0) { + gchar *tmp; g_free(yd->auth); yd->auth = NULL; if (gc->inpa) purple_input_remove(gc->inpa); gc->inpa = 0; - purple_connection_error(gc, _("Unable to connect.")); + tmp = g_strdup_printf(_("Lost connection with %s:\n%s"), + "login.yahoo.com:80", strerror(errno)); + purple_connection_error(gc, tmp); + g_free(tmp); return; } @@ -2533,7 +2545,11 @@ PurpleConnection *gc = data; if (source < 0) { - purple_connection_error(gc, _("Unable to connect.")); + gchar *tmp; + tmp = g_strdup_printf(_("Could not establish a connection with %s:\n%s"), + "login.yahoo.com:80", error_message); + purple_connection_error(gc, tmp); + g_free(tmp); return; } @@ -2616,8 +2632,7 @@ if (error_message != NULL) { - /* TODO: Include error_message in the message below */ - purple_connection_error(gc, _("Unable to connect.")); + purple_connection_error(gc, error_message); return; }