# HG changeset patch # User Sean Egan # Date 1034117678 0 # Node ID 851f421a0f8eaec13d7487ef79ae64ed6dcecaad # Parent 33643170bfde5f4c89771eaa43a87c7f98948854 [gaim-migrate @ 3720] Yay Faceprint! He's the best! This will fix most prpl-autoload-related segfaults with the exception of signing off Jabber. Nathan's working for a fix on that right now. committer: Tailor Script diff -r 33643170bfde -r 851f421a0f8e src/server.c --- a/src/server.c Tue Oct 08 21:12:53 2002 +0000 +++ b/src/server.c Tue Oct 08 22:54:38 2002 +0000 @@ -94,6 +94,11 @@ } } +static gboolean delayed_unload(void *handle) { + g_module_close(handle); + return FALSE; +} + void serv_close(struct gaim_connection *gc) { struct prpl *prpl; @@ -123,7 +128,8 @@ debug_printf("Prpl %s is now being used by %d accounts\n", prpl->name, prpl_accounts[prpl->protocol]); if (prpl_accounts[prpl->protocol] == 0) { /* We don't need this protocol anymore */ debug_printf("Throwing out prpl %s\n", prpl->name); - g_module_close(prpl->plug->handle); + unload_protocol(prpl); + g_timeout_add(0,delayed_unload, prpl->plug->handle); prpl->plug->handle = NULL; } }