aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-08-27 13:34:53 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-08-27 13:34:53 +0800
commitcff92b519ac65c27b1695c8ba2a8d5d6ee36da2b (patch)
treeaf8a40b1ace243040f5be968a7dc603eb4d8109a
parent72690460fa1c2b10a2fc135aab434136664f8fd4 (diff)
downloadgsoc2013-evolution-cff92b519ac65c27b1695c8ba2a8d5d6ee36da2b.tar
gsoc2013-evolution-cff92b519ac65c27b1695c8ba2a8d5d6ee36da2b.tar.gz
gsoc2013-evolution-cff92b519ac65c27b1695c8ba2a8d5d6ee36da2b.tar.bz2
gsoc2013-evolution-cff92b519ac65c27b1695c8ba2a8d5d6ee36da2b.tar.lz
gsoc2013-evolution-cff92b519ac65c27b1695c8ba2a8d5d6ee36da2b.tar.xz
gsoc2013-evolution-cff92b519ac65c27b1695c8ba2a8d5d6ee36da2b.tar.zst
gsoc2013-evolution-cff92b519ac65c27b1695c8ba2a8d5d6ee36da2b.zip
Avoid reentrancy in enable
svn path=/trunk/; revision=34112
-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,