changeset 17770:efb5d0fe4895

Better error message for when a Jabber connection fails
author Mark Doliner <mark@kingant.net>
date Thu, 07 Jun 2007 06:22:37 +0000
parents 21773944db4b
children 7a493fc1e763
files libpurple/protocols/jabber/jabber.c libpurple/protocols/jabber/si.c
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Thu Jun 07 05:28:05 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Thu Jun 07 06:22:37 2007 +0000
@@ -463,7 +463,11 @@
 	JabberStream *js = gc->proto_data;
 
 	if (source < 0) {
-		purple_connection_error(gc, _("Couldn't connect to host"));
+		gchar *tmp;
+		tmp = g_strdup_printf(_("Could not establish a connection with the server:\n%s"),
+				error);
+		purple_connection_error(gc, tmp);
+		g_free(tmp);
 		return;
 	}
 
--- a/libpurple/protocols/jabber/si.c	Thu Jun 07 05:28:05 2007 +0000
+++ b/libpurple/protocols/jabber/si.c	Thu Jun 07 06:22:37 2007 +0000
@@ -105,6 +105,9 @@
 	jsx->connect_data = NULL;
 
 	if(source < 0) {
+		purple_debug_warning("jabber",
+				"si connection failed, jid was %s, host was %s, error was %s\n",
+				streamhost->jid, streamhost->host, error_message);
 		jsx->streamhosts = g_list_remove(jsx->streamhosts, streamhost);
 		g_free(streamhost->jid);
 		g_free(streamhost->host);