Mercurial > pidgin
comparison plugins/autorecon.c @ 8243:217643616a74
[gaim-migrate @ 8966]
a yahoo patch from Daniel (datallah) Atallah that i wish we didn't need,
and another:
"When the auto-reconnect plugin is unloaded, it doesn't
unregister the "signed-off" account event listener,
causing it to continue to try to reconnect you even if
it isn't loaded. This unregisters the listener when the
plugin is unloaded and also prevents any pending
reconnect events from being attempted when the timeout
fires."
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Thu, 12 Feb 2004 19:17:54 +0000 |
parents | 4ce6952d7908 |
children | e7524f4b4ed2 |
comparison
equal
deleted
inserted
replaced
8242:1c06cadec61a | 8243:217643616a74 |
---|---|
16 } GaimAutoRecon; | 16 } GaimAutoRecon; |
17 | 17 |
18 static GHashTable *hash = NULL; | 18 static GHashTable *hash = NULL; |
19 | 19 |
20 static gboolean do_signon(gpointer data) { | 20 static gboolean do_signon(gpointer data) { |
21 g_return_val_if_fail(hash != NULL, FALSE); | |
22 | |
21 GaimAccount *account = data; | 23 GaimAccount *account = data; |
22 GaimAutoRecon *info; | 24 GaimAutoRecon *info; |
23 | 25 |
24 gaim_debug(GAIM_DEBUG_INFO, "autorecon", "do_signon called\n"); | 26 gaim_debug(GAIM_DEBUG_INFO, "autorecon", "do_signon called\n"); |
25 g_return_val_if_fail(account != NULL, FALSE); | 27 g_return_val_if_fail(account != NULL, FALSE); |
83 } | 85 } |
84 | 86 |
85 static gboolean | 87 static gboolean |
86 plugin_unload(GaimPlugin *plugin) | 88 plugin_unload(GaimPlugin *plugin) |
87 { | 89 { |
90 gaim_signal_disconnect(gaim_connections_get_handle(), "signed-off", | |
91 plugin, GAIM_CALLBACK(reconnect)); | |
92 | |
88 g_hash_table_destroy(hash); | 93 g_hash_table_destroy(hash); |
89 hash = NULL; | 94 hash = NULL; |
90 | 95 |
91 return TRUE; | 96 return TRUE; |
92 } | 97 } |