aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/chartable.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-06-29 19:32:31 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-06-29 19:32:31 +0400
commit025f2000d515244e085cd82ac089d7f0271fc531 (patch)
tree1ce03cdd34717418194aaf5fdee6584ad241cc1c /src/plugins/chartable.c
parent21a2da8ea3da88fe2e54785189c0a328fcab4a2a (diff)
downloadrspamd-025f2000d515244e085cd82ac089d7f0271fc531.tar.gz
rspamd-025f2000d515244e085cd82ac089d7f0271fc531.zip
* Add views support (not completely tested yet)
Diffstat (limited to 'src/plugins/chartable.c')
-rw-r--r--src/plugins/chartable.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/chartable.c b/src/plugins/chartable.c
index d05912f57..bb0f79da7 100644
--- a/src/plugins/chartable.c
+++ b/src/plugins/chartable.c
@@ -32,6 +32,7 @@
#include "../modules.h"
#include "../cfg_file.h"
#include "../expressions.h"
+#include "../view.h"
#define DEFAULT_SYMBOL "R_CHARSET_MIXED"
#define DEFAULT_THRESHOLD 0.1
@@ -182,12 +183,14 @@ chartable_mime_filter (struct worker_task *task)
{
GList *cur;
- cur = g_list_first (task->text_parts);
- while (cur) {
- if (check_part ((struct mime_text_part *)cur->data, task->cfg->raw_mode)) {
- insert_result (task, chartable_module_ctx->metric, chartable_module_ctx->symbol, 1, NULL);
+ if (check_view (task->cfg->views, chartable_module_ctx->symbol, task)) {
+ cur = g_list_first (task->text_parts);
+ while (cur) {
+ if (check_part ((struct mime_text_part *)cur->data, task->cfg->raw_mode)) {
+ insert_result (task, chartable_module_ctx->metric, chartable_module_ctx->symbol, 1, NULL);
+ }
+ cur = g_list_next (cur);
}
- cur = g_list_next (cur);
}
return 0;