Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
13373:1ca4a579eb57 | 13374:14d1892e0932 |
---|---|
124 static gboolean | 124 static gboolean |
125 do_signon(gpointer data) | 125 do_signon(gpointer data) |
126 { | 126 { |
127 GaimAccount *account = data; | 127 GaimAccount *account = data; |
128 GaimAutoRecon *info; | 128 GaimAutoRecon *info; |
129 GaimStatus *status; | |
129 | 130 |
130 gaim_debug_info("autorecon", "do_signon called\n"); | 131 gaim_debug_info("autorecon", "do_signon called\n"); |
131 g_return_val_if_fail(account != NULL, FALSE); | 132 g_return_val_if_fail(account != NULL, FALSE); |
132 info = g_hash_table_lookup(hash, account); | 133 info = g_hash_table_lookup(hash, account); |
133 | 134 |
134 if (info) | 135 if (info) |
135 info->timeout = 0; | 136 info->timeout = 0; |
136 | 137 |
137 gaim_debug_info("autorecon", "calling gaim_account_connect\n"); | 138 status = gaim_account_get_active_status(account); |
138 gaim_account_connect(account); | 139 if (gaim_status_is_online(status)) |
139 gaim_debug_info("autorecon", "done calling gaim_account_connect\n"); | 140 { |
141 gaim_debug_info("autorecon", "calling gaim_account_connect\n"); | |
142 gaim_account_connect(account); | |
143 gaim_debug_info("autorecon", "done calling gaim_account_connect\n"); | |
144 } | |
140 | 145 |
141 return FALSE; | 146 return FALSE; |
142 } | 147 } |
143 | 148 |
144 static void | 149 static void |