aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/images.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-23 13:41:05 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-23 13:41:05 +0100
commit41fc49bb5d1a2f9e9ac2c840744e26628312e812 (patch)
tree7b5463caaf94f0f0551e132de14ba1267b498a4c /src/libmime/images.c
parent6667595b57b5b1383f568b06c410d135d831b983 (diff)
downloadrspamd-41fc49bb5d1a2f9e9ac2c840744e26628312e812.tar.gz
rspamd-41fc49bb5d1a2f9e9ac2c840744e26628312e812.zip
Refactor functions in images processing.
Diffstat (limited to 'src/libmime/images.c')
-rw-r--r--src/libmime/images.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libmime/images.c b/src/libmime/images.c
index d60ecf2a0..30150c335 100644
--- a/src/libmime/images.c
+++ b/src/libmime/images.c
@@ -37,7 +37,7 @@ static void process_image (struct rspamd_task *task, struct mime_part *part);
void
-process_images (struct rspamd_task *task)
+rspamd_images_process (struct rspamd_task *task)
{
guint i;
struct mime_part *part;
@@ -52,7 +52,7 @@ process_images (struct rspamd_task *task)
}
-static enum known_image_types
+static enum rspamd_image_type
detect_image_type (GByteArray *data)
{
if (data->len > sizeof (png_signature) / sizeof (png_signature[0])) {
@@ -230,7 +230,7 @@ process_image (struct rspamd_task *task, struct mime_part *part)
if (img != NULL) {
debug_task ("detected %s image of size %ud x %ud in message <%s>",
- image_type_str (img->type),
+ rspamd_image_type_str (img->type),
img->width, img->height,
task->message_id);
img->filename = part->filename;
@@ -286,7 +286,7 @@ process_image (struct rspamd_task *task, struct mime_part *part)
}
const gchar *
-image_type_str (enum known_image_types type)
+rspamd_image_type_str (enum rspamd_image_type type)
{
switch (type) {
case IMAGE_TYPE_PNG:
@@ -301,9 +301,6 @@ image_type_str (enum known_image_types type)
case IMAGE_TYPE_BMP:
return "BMP";
break;
- case IMAGE_TYPE_HTML:
- return "HTML";
- break;
default:
break;
}