Mercurial > pidgin
diff 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 |
line wrap: on
line diff
--- a/plugins/autorecon.c Thu Feb 12 19:13:55 2004 +0000 +++ b/plugins/autorecon.c Thu Feb 12 19:17:54 2004 +0000 @@ -18,6 +18,8 @@ static GHashTable *hash = NULL; static gboolean do_signon(gpointer data) { + g_return_val_if_fail(hash != NULL, FALSE); + GaimAccount *account = data; GaimAutoRecon *info; @@ -85,6 +87,9 @@ static gboolean plugin_unload(GaimPlugin *plugin) { + gaim_signal_disconnect(gaim_connections_get_handle(), "signed-off", + plugin, GAIM_CALLBACK(reconnect)); + g_hash_table_destroy(hash); hash = NULL;