aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-26 17:04:55 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-26 17:04:55 +0000
commit22259fdbd6e2a0a99b6c29df2dd4f1e2eedfe66f (patch)
tree117811cdcf409bb81013729a67dc1cfa672324c9 /src/plugins
parentb840e3afa41c0e7a53de05e989bc647b08fe842d (diff)
downloadrspamd-22259fdbd6e2a0a99b6c29df2dd4f1e2eedfe66f.tar.gz
rspamd-22259fdbd6e2a0a99b6c29df2dd4f1e2eedfe66f.zip
Remove legacy words, use merely normalized_words
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/fuzzy_check.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index cf58eb672..e726419db 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -592,17 +592,7 @@ fuzzy_io_fin (void *ud)
static GArray *
fuzzy_preprocess_words (struct mime_text_part *part, rspamd_mempool_t *pool)
{
- GArray *res;
-
- if (!IS_PART_UTF (part) || !part->language || part->language[0] == '\0' ||
- part->normalized_words == NULL) {
- res = part->words;
- }
- else {
- res = part->normalized_words;
- }
-
- return res;
+ return part->normalized_words;
}
/*
@@ -1259,14 +1249,14 @@ fuzzy_generate_commands (struct rspamd_task *task, struct fuzzy_rule *rule,
continue;
}
- if (part->words == NULL || part->words->len == 0) {
+ if (part->normalized_words == NULL || part->normalized_words->len == 0) {
msg_info_task ("<%s>, part hash empty, skip fuzzy check",
task->message_id);
continue;
}
if (fuzzy_module_ctx->min_hash_len != 0 &&
- part->words->len < fuzzy_module_ctx->min_hash_len) {
+ part->normalized_words->len < fuzzy_module_ctx->min_hash_len) {
msg_info_task (
"<%s>, part hash is shorter than %d symbols, skip fuzzy check",
task->message_id,