diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-07-04 16:14:53 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-07-04 16:14:53 +0100 |
commit | 759fa05d26aeb86fa9005ce39d222c65c45ef787 (patch) | |
tree | 14242f0bb9738f9646fe240b4e41bfbd15bae074 /src/libmime/images.c | |
parent | d52a62c089c6e498e936bd53ebd59b1a774b62a8 (diff) | |
download | rspamd-759fa05d26aeb86fa9005ce39d222c65c45ef787.tar.gz rspamd-759fa05d26aeb86fa9005ce39d222c65c45ef787.zip |
[Rework] Remove dedicated images list
Diffstat (limited to 'src/libmime/images.c')
-rw-r--r-- | src/libmime/images.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libmime/images.c b/src/libmime/images.c index 008522a7b..5a556ce9c 100644 --- a/src/libmime/images.c +++ b/src/libmime/images.c @@ -15,7 +15,7 @@ */ #include "config.h" #include "images.h" -#include "rspamd.h" +#include "task.h" #include "message.h" #include "html.h" @@ -37,8 +37,8 @@ rspamd_images_process (struct rspamd_task *task) for (i = 0; i < task->parts->len; i ++) { part = g_ptr_array_index (task->parts, i); - if (g_mime_content_type_is_type (part->type, "image", - "*") && part->content->len > 0) { + if (g_mime_content_type_is_type (part->type, "image", "*") && + part->content->len > 0) { process_image (task, part); } } @@ -226,7 +226,8 @@ process_image (struct rspamd_task *task, struct rspamd_mime_part *part) img->width, img->height, task->message_id); img->filename = part->filename; - task->images = g_list_prepend (task->images, img); + part->flags |= RSPAMD_MIME_PART_IMAGE; + part->specific_data = img; /* Check Content-Id */ rh = g_hash_table_lookup (part->raw_headers, "Content-Id"); |