pidgin: 8c4498cf: Reorder (and document) purple_core_quit(...

datallah at pidgin.im datallah at pidgin.im
Mon Jan 19 23:36:20 EST 2009


-----------------------------------------------------------------
Revision: 8c4498cf31a819963d4ee74d433f2ed267d65b51
Ancestor: c2797e3aebf59d6216bf8bf5546e6828d238cdde
Author: paul at darkrain42.org
Date: 2009-01-20T04:31:14
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8c4498cf31a819963d4ee74d433f2ed267d65b51

Modified files:
        libpurple/core.c

ChangeLog: 

Reorder (and document) purple_core_quit() so that the prefs_uninit() fixes can
be reenabled.  Fixes #8064,#7761

-------------- next part --------------
============================================================
--- libpurple/core.c	361874bd3f2080adc3d38101a73fdf5ff2e65f56
+++ libpurple/core.c	68f8fbe9e2d79d11573560275308de887fed74e9
@@ -198,10 +198,22 @@ purple_core_quit(void)
 	/* Transmission ends */
 	purple_connections_disconnect_all();
 
+	/* The SSL plugins must be uninit before they're unloaded */
+	purple_ssl_uninit();
+
+	/* Unload all plugins before the UI because UI plugins might call
+	 * UI-specific functions */
+	purple_debug_info("main", "Unloading all plugins\n");
+	purple_plugins_destroy_all();
+
+	/* Shut down the UI before all the subsystems */
+	ops = purple_core_get_ui_ops();
+	if (ops != NULL && ops->quit != NULL)
+		ops->quit();
+
 	/* Save .xml files, remove signals, etc. */
 	purple_smileys_uninit();
 	purple_idle_uninit();
-	purple_ssl_uninit();
 	purple_pounces_uninit();
 	purple_blist_uninit();
 	purple_ciphers_uninit();
@@ -221,19 +233,15 @@ purple_core_quit(void)
 	purple_imgstore_uninit();
 	purple_network_uninit();
 
-	purple_debug_info("main", "Unloading all plugins\n");
-	purple_plugins_destroy_all();
-
-	ops = purple_core_get_ui_ops();
-	if (ops != NULL && ops->quit != NULL)
-		ops->quit();
-
+	/* Everything after this must not try to read any prefs */
+	purple_prefs_uninit();
 	purple_plugins_uninit();
 #ifdef HAVE_DBUS
 	purple_dbus_uninit();
 #endif
 
 	purple_cmds_uninit();
+	/* Everything after this cannot try to write things to the confdir */
 	purple_util_uninit();
 
 	purple_signals_uninit();


More information about the Commits mailing list