pidgin: 48c97854: Clean up loggers when quitting (or unloa...
datallah at pidgin.im
datallah at pidgin.im
Sat May 3 19:56:39 EDT 2008
-----------------------------------------------------------------
Revision: 48c9785414ebedaa4c514a00bb5fa17504252675
Ancestor: 0b5c597928c61176ae2b63d001a9dcb644b1279e
Author: datallah at pidgin.im
Date: 2008-05-03T19:45:15
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/48c9785414ebedaa4c514a00bb5fa17504252675
Modified files:
libpurple/log.c libpurple/plugins/log_reader.c
ChangeLog:
Clean up loggers when quitting (or unloading the logreader plugin).
-------------- next part --------------
============================================================
--- libpurple/log.c 85b55eebdfc924a7f6b12e8bb4f0fa5b2c3ef363
+++ libpurple/log.c f3c5389236d89eb25cfe6490c4e06d427f467935
@@ -667,6 +667,18 @@ purple_log_uninit(void)
purple_log_uninit(void)
{
purple_signals_unregister_by_instance(purple_log_get_handle());
+
+ purple_log_logger_remove(html_logger);
+ purple_log_logger_free(html_logger);
+ html_logger = NULL;
+
+ purple_log_logger_remove(txt_logger);
+ purple_log_logger_free(txt_logger);
+ txt_logger = NULL;
+
+ purple_log_logger_remove(old_logger);
+ purple_log_logger_free(old_logger);
+ old_logger = NULL;
}
/****************************************************************************
============================================================
--- libpurple/plugins/log_reader.c c042ffa023b044b0e7b49fd3c2c945f8c056f04e
+++ libpurple/plugins/log_reader.c ceb4741c6985e08a746f78e23923750dcede8939
@@ -2789,14 +2789,34 @@ plugin_unload(PurplePlugin *plugin)
g_return_val_if_fail(plugin != NULL, FALSE);
purple_log_logger_remove(adium_logger);
+ purple_log_logger_free(adium_logger);
+ adium_logger = NULL;
+
#if 0
purple_log_logger_remove(fire_logger);
+ purple_log_logger_free(fire_logger);
+ fire_logger = NULL;
+
purple_log_logger_remove(messenger_plus_logger);
+ purple_log_logger_free(messenger_plus_logger);
+ messenger_plus_logger = NULL;
#endif
+
purple_log_logger_remove(msn_logger);
+ purple_log_logger_free(msn_logger);
+ msn_logger = NULL;
+
purple_log_logger_remove(trillian_logger);
+ purple_log_logger_free(trillian_logger);
+ trillian_logger = NULL;
+
purple_log_logger_remove(qip_logger);
+ purple_log_logger_free(qip_logger);
+ qip_logger = NULL;
+
purple_log_logger_remove(amsn_logger);
+ purple_log_logger_free(amsn_logger);
+ amsn_logger = NULL;
return TRUE;
}
More information about the Commits
mailing list