diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-08-27 13:34:53 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-08-27 13:34:53 +0800 |
commit | cff92b519ac65c27b1695c8ba2a8d5d6ee36da2b (patch) | |
tree | af8a40b1ace243040f5be968a7dc603eb4d8109a /plugins/bogo-junk-plugin | |
parent | 72690460fa1c2b10a2fc135aab434136664f8fd4 (diff) | |
download | gsoc2013-evolution-cff92b519ac65c27b1695c8ba2a8d5d6ee36da2b.tar.gz gsoc2013-evolution-cff92b519ac65c27b1695c8ba2a8d5d6ee36da2b.tar.zst gsoc2013-evolution-cff92b519ac65c27b1695c8ba2a8d5d6ee36da2b.zip |
Avoid reentrancy in enable
svn path=/trunk/; revision=34112
Diffstat (limited to 'plugins/bogo-junk-plugin')
-rw-r--r-- | plugins/bogo-junk-plugin/ChangeLog | 5 | ||||
-rw-r--r-- | plugins/bogo-junk-plugin/bf-junk-filter.c | 5 |
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, |