changeset 20119:ec3471ab96d6

Check in purple_connection_error_reason that purple_connection_reason_is_fatal == wants_to_die, and log a debug warning if not.
author Will Thompson <will.thompson@collabora.co.uk>
date Wed, 19 Sep 2007 15:16:32 +0000
parents c26b7aff4e96
children 557c4c67bd29
files libpurple/connection.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/connection.c	Wed Sep 19 15:06:26 2007 +0000
+++ b/libpurple/connection.c	Wed Sep 19 15:16:32 2007 +0000
@@ -497,6 +497,7 @@
                                 const char *description)
 {
 	PurpleConnectionUiOps *ops;
+	gboolean fatal;
 
 	g_return_if_fail(gc   != NULL);
 
@@ -507,6 +508,13 @@
 
 	g_assert (reason < PURPLE_NUM_REASONS);
 
+	/* This should probably be removed at some point */
+	fatal = purple_connection_reason_is_fatal (reason);
+	if (fatal != gc->wants_to_die)
+		purple_debug_warning ("connection",
+			"reason %u is %sfatal but wants_to_die is %u",
+			reason, (fatal ? "" : "not "), gc->wants_to_die);
+
 	/* If we've already got one error, we don't need any more */
 	if (gc->disconnect_timeout)
 		return;