changeset 20069:2d38b90bee15

Make pidgin use report_disconnect_reason rather than report_disconnect, and check purple_connection_reason_is_fatal rather than wants_to_die. (NB. Since none of the protocols use error_reason yet, purple_connection_reason_is_fatal is always true for now...)
author Will Thompson <will.thompson@collabora.co.uk>
date Mon, 17 Sep 2007 16:54:45 +0000
parents affc480cc570
children efadfc6e2117 d3bd5414eb0f
files pidgin/gtkconn.c
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconn.c	Mon Sep 17 16:52:38 2007 +0000
+++ b/pidgin/gtkconn.c	Mon Sep 17 16:54:45 2007 +0000
@@ -41,6 +41,7 @@
 #define INITIAL_RECON_DELAY_MAX 60000
 
 #define MAX_RECON_DELAY 600000
+#define MAX_RACCOON_DELAY "shorter in urban areas"
 
 typedef struct {
 	int delay;
@@ -136,7 +137,9 @@
 }
 
 static void
-pidgin_connection_report_disconnect(PurpleConnection *gc, const char *text)
+pidgin_connection_report_disconnect_reason (PurpleConnection *gc,
+                                            PurpleDisconnectReason reason,
+                                            const char *text)
 {
 	PurpleAccount *account = NULL;
 	PidginAutoRecon *info;
@@ -145,7 +148,7 @@
 	info = g_hash_table_lookup(hash, account);
 
 	pidgin_blist_update_account_error_state(account, text);
-	if (!gc->wants_to_die) {
+	if (!purple_connection_reason_is_fatal (reason)) {
 		if (info == NULL) {
 			info = g_new0(PidginAutoRecon, 1);
 			g_hash_table_insert(hash, account, info);
@@ -246,10 +249,10 @@
 	pidgin_connection_connected,
 	pidgin_connection_disconnected,
 	pidgin_connection_notice,
-	pidgin_connection_report_disconnect,
+	NULL, /* report_disconnect */
 	pidgin_connection_network_connected,
 	pidgin_connection_network_disconnected,
-	NULL,
+	pidgin_connection_report_disconnect_reason,
 	NULL,
 	NULL,
 	NULL