diff src/gtkconn.c @ 13374:14d1892e0932

[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" committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 02 Mar 2006 05:58:21 +0000
parents 8adf78fc630c
children 6818e4fc3616
line wrap: on
line diff
--- 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;
 }