diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-10-26 14:49:37 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-10-26 14:49:37 +0000 |
commit | 4aee16e53d385803b2bae74255909aa0167fd823 (patch) | |
tree | 7dec7260dd9d4dbdce9ea5d9ec3499ecd4e77eb9 /src/libstat | |
parent | 2d07ce2339f00513906be2c9fa9aa4e64d36c48b (diff) | |
download | rspamd-4aee16e53d385803b2bae74255909aa0167fd823.tar.gz rspamd-4aee16e53d385803b2bae74255909aa0167fd823.zip |
[Minor] Fix rspamd_has_only_html_part function + refactor macro names
Diffstat (limited to 'src/libstat')
-rw-r--r-- | src/libstat/stat_process.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c index 9cd425206..0b22cbd11 100644 --- a/src/libstat/stat_process.c +++ b/src/libstat/stat_process.c @@ -132,7 +132,7 @@ rspamd_stat_process_tokenize (struct rspamd_stat_ctx *st_ctx, g_assert (st_ctx != NULL); PTR_ARRAY_FOREACH (MESSAGE_FIELD (task, text_parts), i, part) { - if (!IS_PART_EMPTY (part) && part->utf_words != NULL) { + if (!IS_TEXT_PART_EMPTY (part) && part->utf_words != NULL) { reserved_len += part->utf_words->len; } /* XXX: normal window size */ @@ -146,9 +146,9 @@ rspamd_stat_process_tokenize (struct rspamd_stat_ctx *st_ctx, pdiff = rspamd_mempool_get_variable (task->task_pool, "parts_distance"); PTR_ARRAY_FOREACH (MESSAGE_FIELD (task, text_parts), i, part) { - if (!IS_PART_EMPTY (part) && part->utf_words != NULL) { + if (!IS_TEXT_PART_EMPTY (part) && part->utf_words != NULL) { st_ctx->tokenizer->tokenize_func (st_ctx, task, - part->utf_words, IS_PART_UTF (part), + part->utf_words, IS_TEXT_PART_UTF (part), NULL, task->tokens); } |