changeset 21846:717176f247ab

Don't bother making transient connection errors persist across a restart. (No-one cares that their Jabber account was knocked offline because of a DNS failure yesterday...)
author Will Thompson <will.thompson@collabora.co.uk>
date Mon, 17 Dec 2007 12:09:59 +0000
parents 45d1e229fadd
children 378eb1893499
files libpurple/account.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/account.c	Mon Dec 17 12:09:19 2007 +0000
+++ b/libpurple/account.c	Mon Dec 17 12:09:59 2007 +0000
@@ -331,6 +331,12 @@
 	if(err == NULL)
 		return node;
 
+	/* It doesn't make sense to have transient errors persist across a
+	 * restart.
+	 */
+	if(!purple_connection_error_is_fatal (err->type))
+		return node;
+
 	child = xmlnode_new_child(node, "type");
 	snprintf(type_str, sizeof(type_str), "%u", err->type);
 	xmlnode_insert_data(child, type_str, -1);