comparison plugins/autorecon.c @ 7372:4ce6952d7908

[gaim-migrate @ 7967] fix an autorecon segfault committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 29 Oct 2003 21:44:11 +0000
parents cc1d09631513
children 217643616a74
comparison
equal deleted inserted replaced
7371:2ec21bff351b 7372:4ce6952d7908
26 info = g_hash_table_lookup(hash, account); 26 info = g_hash_table_lookup(hash, account);
27 27
28 if (g_list_index(gaim_accounts_get_all(), account) < 0) 28 if (g_list_index(gaim_accounts_get_all(), account) < 0)
29 return FALSE; 29 return FALSE;
30 30
31 if(info)
32 info->timeout = 0;
33
31 gaim_debug(GAIM_DEBUG_INFO, "autorecon", "calling gaim_account_connect\n"); 34 gaim_debug(GAIM_DEBUG_INFO, "autorecon", "calling gaim_account_connect\n");
32 gaim_account_connect(account); 35 gaim_account_connect(account);
33 gaim_debug(GAIM_DEBUG_INFO, "autorecon", "done calling gaim_account_connect\n"); 36 gaim_debug(GAIM_DEBUG_INFO, "autorecon", "done calling gaim_account_connect\n");
34
35 if(info)
36 info->timeout = 0;
37 37
38 return FALSE; 38 return FALSE;
39 } 39 }
40 40
41 static void reconnect(GaimConnection *gc, void *m) { 41 static void reconnect(GaimConnection *gc, void *m) {
54 } else 54 } else
55 info->delay = MIN(2 * info->delay, MAXTIME); 55 info->delay = MIN(2 * info->delay, MAXTIME);
56 info->timeout = g_timeout_add(info->delay, do_signon, account); 56 info->timeout = g_timeout_add(info->delay, do_signon, account);
57 } else if (info != NULL) { 57 } else if (info != NULL) {
58 g_hash_table_remove(hash, account); 58 g_hash_table_remove(hash, account);
59 g_free(info);
60 } 59 }
61 } 60 }
62 61
63 static void 62 static void
64 free_auto_recon(gpointer data) 63 free_auto_recon(gpointer data)