summaryrefslogtreecommitdiffstats
path: root/src/plugins/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-07-29 20:25:22 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-07-29 20:25:22 +0400
commit9bd902ee1d0ebb87e789e335dc71bc7fb87e9e8e (patch)
treee68d476e7cd564a5462e697a7743da983aec3827 /src/plugins/regexp.c
parentc4621d35aebaf9c6d466bf7a15a9de340b20b0ce (diff)
downloadrspamd-9bd902ee1d0ebb87e789e335dc71bc7fb87e9e8e.tar.gz
rspamd-9bd902ee1d0ebb87e789e335dc71bc7fb87e9e8e.zip
* Add support for empty text or html parts
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r--src/plugins/regexp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index 23ec3908c..45f07f9e7 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -335,6 +335,11 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task)
cur = g_list_first (task->text_parts);
while (cur) {
part = (struct mime_text_part *)cur->data;
+ /* Skip empty parts */
+ if (part->is_empty) {
+ cur = g_list_next (cur);
+ continue;
+ }
if (part->is_raw) {
regexp = re->raw_regexp;
}
@@ -371,6 +376,11 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task)
cur = g_list_first (task->text_parts);
while (cur) {
part = (struct mime_text_part *)cur->data;
+ /* Skip empty parts */
+ if (part->is_empty) {
+ cur = g_list_next (cur);
+ continue;
+ }
if (part->is_raw) {
regexp = re->raw_regexp;
}