changeset 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 1ca4a579eb57
children a6b846c71358
files src/gtkconn.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
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;
 }