pidgin: af98df2c: The end user is not going to be amused w...
ivan.komarov at soc.pidgin.im
ivan.komarov at soc.pidgin.im
Thu Nov 4 20:45:50 EDT 2010
----------------------------------------------------------------------
Revision: af98df2ced30153e243ac24e445753aa111fafbc
Parent: d4d69fea75073152418e32247324703f325b532f
Author: ivan.komarov at soc.pidgin.im
Date: 11/04/10 14:28:48
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/af98df2ced30153e243ac24e445753aa111fafbc
Changelog:
The end user is not going to be amused when he sees a "<URL>: Ok" connection
error.
Changes against parent d4d69fea75073152418e32247324703f325b532f
patched libpurple/protocols/oscar/clientlogin.c
-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/clientlogin.c f86fcbd332d2a4dddbbd8667918b89320ac03f30
+++ libpurple/protocols/oscar/clientlogin.c 01dfd5fe2ed083edba1a62f0fe2b7e50bb6f3ec3
@@ -93,10 +93,22 @@ static gchar *generate_error_message(xml
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);
}
More information about the Commits
mailing list