Index: src/protocols/msn/error.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/error.c,v retrieving revision 1.7 diff -u -u -r1.7 error.c --- src/protocols/msn/error.c 19 Mar 2004 20:17:31 -0000 1.7 +++ src/protocols/msn/error.c 27 Mar 2004 01:01:03 -0000 @@ -28,16 +28,19 @@ static char msg[MSN_BUF_LEN]; switch (type) { + case 0: + g_snprintf(msg, sizeof(msg), + _("Unable to parse message")); case 200: g_snprintf(msg, sizeof(msg), _("Syntax Error (probably a Gaim bug)")); break; case 201: g_snprintf(msg, sizeof(msg), - _("Invalid Parameter (probably a Gaim bug)")); + _("Invalid email address")); break; case 205: - g_snprintf(msg, sizeof(msg), _("Invalid User")); + g_snprintf(msg, sizeof(msg), _("User does not exist")); break; case 206: g_snprintf(msg, sizeof(msg), @@ -166,7 +169,7 @@ g_snprintf(msg, sizeof(msg), _("Too many sessions")); break; case 715: - g_snprintf(msg, sizeof(msg), _("Not expected")); + g_snprintf(msg, sizeof(msg), _("Passport not verified")); break; case 717: g_snprintf(msg, sizeof(msg), _("Bad friend file")); @@ -226,9 +229,10 @@ void msn_error_handle(MsnSession *session, unsigned int type) { - const char *text; + char buf[MSN_BUF_LEN]; - text = msn_error_get_text(type); + g_snprintf(buf, sizeof(buf), _("MSN Error: %s\n"), + msn_error_get_text(type)); - gaim_notify_error(session->account->gc, NULL, text, NULL); + gaim_notify_error(session->account->gc, NULL, buf, NULL); } Index: src/protocols/msn/notification.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/notification.c,v retrieving revision 1.89 diff -u -u -r1.89 notification.c --- src/protocols/msn/notification.c 19 Mar 2004 20:17:31 -0000 1.89 +++ src/protocols/msn/notification.c 27 Mar 2004 01:01:03 -0000 @@ -198,10 +198,10 @@ unknown_cmd(MsnServConn *servconn, const char *command, const char **params, size_t param_count) { - char buf[MSN_BUF_LEN]; - + int errnum = 0; + if (isdigit(*command)) { - int errnum = atoi(command); + errnum = atoi(command); if (errnum == 225) { /* @@ -211,15 +211,9 @@ */ return TRUE; } - - g_snprintf(buf, sizeof(buf), _("MSN Error: %s\n"), - msn_error_get_text(errnum)); } - else { - g_snprintf(buf, sizeof(buf), "MSN Error: Unable to parse message\n"); - } - - gaim_notify_error(servconn->session->account->gc, NULL, buf, NULL); + + msn_error_handle(servconn->session, errnum); return TRUE; } Index: src/protocols/msn/servconn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/servconn.c,v retrieving revision 1.27 diff -u -u -r1.27 servconn.c --- src/protocols/msn/servconn.c 19 Mar 2004 20:17:31 -0000 1.27 +++ src/protocols/msn/servconn.c 27 Mar 2004 01:01:04 -0000 @@ -21,6 +21,7 @@ */ #include "msn.h" #include "servconn.h" +#include "error.h" typedef struct { @@ -84,7 +85,10 @@ cb = g_hash_table_lookup(servconn->commands, "_unknown_"); if (cb == NULL) { - gaim_debug(GAIM_DEBUG_WARNING, "msn", + if (isdigit(*str)) + msn_error_handle(session, atoi(str)); + else + gaim_debug(GAIM_DEBUG_WARNING, "msn", "Unhandled command '%s'\n", str); if (params != NULL)