diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-01-21 17:25:06 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-01-21 17:25:06 +0300 |
commit | 1dc0f6ad2c2e97e11881a7e1b0a4142e65f50898 (patch) | |
tree | f0a714e2e87ebd50f6016c8cc7f2a8e03a9cc2d8 /perl/rspamd.xs | |
parent | 87c9659fdd08bbbc0eb796afccf7237a03181498 (diff) | |
download | rspamd-1dc0f6ad2c2e97e11881a7e1b0a4142e65f50898.tar.gz rspamd-1dc0f6ad2c2e97e11881a7e1b0a4142e65f50898.zip |
* Rewrite message parser
* Change mime parts storage
* Add html tags striping (ported from php code)
* Rework learning to process only text and striped html parts
Diffstat (limited to 'perl/rspamd.xs')
-rw-r--r-- | perl/rspamd.xs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/perl/rspamd.xs b/perl/rspamd.xs index 7020e3463..4dfc9e665 100644 --- a/perl/rspamd.xs +++ b/perl/rspamd.xs @@ -13,6 +13,7 @@ #include "../src/config.h" #include "../src/main.h" +#include "../src/message.h" #include "../src/cfg_file.h" #include "../src/perl.h" #include "../src/mem_pool.h" @@ -86,12 +87,8 @@ rspamd_task_get_part (r, num) if (number < 0 || number > r->parts_count - 1) { XSRETURN_UNDEF; } - - TAILQ_FOREACH (part, &r->parts, next) { - if (--number == 0) { - break; - } - } + + part = g_list_nth_data (r->parts, number); RETVAL = newHV(); type = g_mime_content_type_to_string (part->type); |