aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/bogo-junk-plugin/ChangeLog5
-rw-r--r--plugins/bogo-junk-plugin/bf-junk-filter.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/bogo-junk-plugin/ChangeLog b/plugins/bogo-junk-plugin/ChangeLog
index 8ce0bbf71b..db92715031 100644
--- a/plugins/bogo-junk-plugin/ChangeLog
+++ b/plugins/bogo-junk-plugin/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-27 Srinivasa Ragavan <sragavan@novell.com>
+
+ * bf-junk-filter.c: (e_plugin_lib_enable): Avoid re-entrancy in
+ enable
+
2007-08-22 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #468294
diff --git a/plugins/bogo-junk-plugin/bf-junk-filter.c b/plugins/bogo-junk-plugin/bf-junk-filter.c
index 1f7ab6bbbd..c0e85c9916 100644
--- a/plugins/bogo-junk-plugin/bf-junk-filter.c
+++ b/plugins/bogo-junk-plugin/bf-junk-filter.c
@@ -51,6 +51,7 @@
#define d(x) (camel_debug("junk")?(x):0)
+static gboolean enabled = FALSE;
static gchar em_junk_bf_binary[] = BOGOFILTER_BINARY;
@@ -256,10 +257,10 @@ e_plugin_lib_enable (EPluginLib *ep, int enable)
{
GConfClient *gconf;
- if (enable != 1) {
+ if (enable != 1 || enabled == TRUE) {
return 0;
}
-
+ enabled = TRUE;
gconf = gconf_client_get_default();
gconf_client_add_dir (gconf,