[gaim-migrate @ 15747]

Thu, 02 Mar 2006 05:58:21 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Thu, 02 Mar 2006 05:58:21 +0000
changeset 13375
5ce3cb98de9f
parent 13374
e5da5325b1fa
child 13376
4b4c3c4d068e

[gaim-migrate @ 15747]
Fix the showstopper bug about autoreconnect being too aggressive
"If you try to connect to an account and it fails, switching your
global status to Offline will not prevent the autoreconnect from
trying to re-connect"

src/gtkconn.c file | annotate | diff | comparison | revisions
--- a/src/gtkconn.c	Thu Mar 02 04:51:09 2006 +0000
+++ b/src/gtkconn.c	Thu Mar 02 05:58:21 2006 +0000
@@ -126,6 +126,7 @@
 {
 	GaimAccount *account = data;
 	GaimAutoRecon *info;
+	GaimStatus *status;
 
 	gaim_debug_info("autorecon", "do_signon called\n");
 	g_return_val_if_fail(account != NULL, FALSE);
@@ -134,9 +135,13 @@
 	if (info)
 		info->timeout = 0;
 
-	gaim_debug_info("autorecon", "calling gaim_account_connect\n");
-	gaim_account_connect(account);
-	gaim_debug_info("autorecon", "done calling gaim_account_connect\n");
+	status = gaim_account_get_active_status(account);
+	if (gaim_status_is_online(status))
+	{
+		gaim_debug_info("autorecon", "calling gaim_account_connect\n");
+		gaim_account_connect(account);
+		gaim_debug_info("autorecon", "done calling gaim_account_connect\n");
+	}
 
 	return FALSE;
 }

mercurial