# HG changeset patch # User ivan.komarov@soc.pidgin.im # Date 1288895328 0 # Node ID 4f0d6ee5ffee6f902d283c0599a8a9f6a18f17bf # Parent 56e1f06471a9ceb89e0df00d4b720aea77338ac1 The end user is not going to be amused when he sees a ": Ok" connection error. diff -r 56e1f06471a9 -r 4f0d6ee5ffee libpurple/protocols/oscar/clientlogin.c --- a/libpurple/protocols/oscar/clientlogin.c Tue Nov 02 20:55:06 2010 +0000 +++ b/libpurple/protocols/oscar/clientlogin.c Thu Nov 04 18:28:48 2010 +0000 @@ -93,10 +93,22 @@ static gchar *generate_error_message(xmlnode *resp, const char *url) { xmlnode *text; + xmlnode *status_code_node; + gchar *status_code; + gboolean have_error_code = TRUE; gchar *err = NULL; gchar *details = NULL; - if (resp && (text = xmlnode_get_child(resp, "statusText"))) { + status_code_node = xmlnode_get_child(resp, "statusCode"); + if (status_code_node) { + /* We can get 200 OK here if the server omitted something we think it shouldn't have (see #12783). + * No point in showing the "Ok" string to the user. + */ + if ((status_code = xmlnode_get_data_unescaped(status_code_node)) && strcmp(status_code, "200") == 0) { + have_error_code = FALSE; + } + } + if (have_error_code && resp && (text = xmlnode_get_child(resp, "statusText"))) { details = xmlnode_get_data(text); }