pidgin/pidgin

Check in purple_connection_error_reason that purple_connection_reason_is_fatal
cpw.resiak.disconnectreason
2007-09-19, Will Thompson
50772fec9221
Parents 9c5f56f82ec1
Children 7ad9785266ea
Check in purple_connection_error_reason that purple_connection_reason_is_fatal
== wants_to_die, and log a debug warning if not.
--- 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;