changeset 20931:f56e94167372

Set log_reader paths at plugin load time instead of init time. This should hopefully make any crashes more clearly attributable to this plugin (hopefully there are no outstanding crashes in the init code, but this is a safeguard).
author Daniel Atallah <daniel.atallah@gmail.com>
date Sun, 14 Oct 2007 20:35:13 +0000
parents d0fdf2f95277
children df06520dbb4d d1695d02c498
files libpurple/plugins/log_reader.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/log_reader.c	Sun Oct 14 20:25:20 2007 +0000
+++ b/libpurple/plugins/log_reader.c	Sun Oct 14 20:35:13 2007 +0000
@@ -2423,14 +2423,16 @@
 static void
 init_plugin(PurplePlugin *plugin)
 {
+
+}
+
+static void log_reader_init_prefs() {
 	char *path;
 #ifdef _WIN32
 	char *folder;
 	gboolean found = FALSE;
 #endif
 
-	g_return_if_fail(plugin != NULL);
-
 	purple_prefs_add_none("/plugins/core/log_reader");
 
 
@@ -2689,6 +2691,8 @@
 {
 	g_return_val_if_fail(plugin != NULL, FALSE);
 
+	log_reader_init_prefs();
+
 	/* The names of IM clients are marked for translation at the request of
 	   translators who wanted to transliterate them.  Many translators
 	   choose to leave them alone.  Choose what's best for your language. */