diff libpurple/plugins/log_reader.c @ 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 89c7be36fd61
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. */