diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-06-24 20:25:54 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-06-24 20:25:54 +0400 |
commit | a3fa4d672341fd2f1888d3a2f2ed85ae57913b78 (patch) | |
tree | 352c634bbbc74cf17644545ace66a8feedc841c3 /src/fuzzy.c | |
parent | 63725086863e4f422340479f83dd7ef374613e76 (diff) | |
download | rspamd-a3fa4d672341fd2f1888d3a2f2ed85ae57913b78.tar.gz rspamd-a3fa4d672341fd2f1888d3a2f2ed85ae57913b78.zip |
* Welcome 0.4.0
Uncompatible changes:
- Statistics is uncompatible in utf8 mode
Major changes:
- Improved utf8 mode
- Convert all characters to lowercase in statistics
- Skip URL's in statistics
- Improve speed of bayes classifier by using integer arithmetics
- Fixed statfiles synchronization that was broken for a long time
- Synchronization is now configurable
Minor changes:
- Bugfixes
- Removed some of legacy code
- Types polishing
Diffstat (limited to 'src/fuzzy.c')
-rw-r--r-- | src/fuzzy.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/fuzzy.c b/src/fuzzy.c index 1a9337071..0a24494e2 100644 --- a/src/fuzzy.c +++ b/src/fuzzy.c @@ -320,11 +320,11 @@ fuzzy_init_part (struct mime_text_part *part, memory_pool_t *pool) gchar *c; gsize real_len = 0, len = part->content->len; GList *cur_offset; - struct uri *cur_url = NULL; + struct process_exception *cur_ex = NULL; cur_offset = part->urls_offset; if (cur_offset != NULL) { - cur_url = cur_offset->data; + cur_ex = cur_offset->data; } c = part->content->data; @@ -332,12 +332,12 @@ fuzzy_init_part (struct mime_text_part *part, memory_pool_t *pool) new2 = memory_pool_alloc0 (pool, sizeof (fuzzy_hash_t)); bzero (&rs, sizeof (rs)); for (i = 0; i < len;) { - if (cur_url != NULL && cur_url->pos == i) { - i += cur_url->len + 1; - c += cur_url->len + 1; + if (cur_ex != NULL && cur_ex->pos == i) { + i += cur_ex->len + 1; + c += cur_ex->len + 1; cur_offset = g_list_next (cur_offset); if (cur_offset != NULL) { - cur_url = cur_offset->data; + cur_ex = cur_offset->data; } } else { @@ -354,18 +354,18 @@ fuzzy_init_part (struct mime_text_part *part, memory_pool_t *pool) cur_offset = part->urls_offset; if (cur_offset != NULL) { - cur_url = cur_offset->data; + cur_ex = cur_offset->data; } c = part->content->data; for (i = 0; i < len;) { - if (cur_url != NULL && cur_url->pos == i) { - i += cur_url->len + 1; - c += cur_url->len + 1; + if (cur_ex != NULL && cur_ex->pos == i) { + i += cur_ex->len + 1; + c += cur_ex->len + 1; cur_offset = g_list_next (cur_offset); if (cur_offset != NULL) { - cur_url = cur_offset->data; + cur_ex = cur_offset->data; } } else { |