aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/mime_parser.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-05 17:58:27 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-05 17:58:27 +0000
commit145ffe5a0671ff5ac28a2ecced78548f7f1cb0ac (patch)
tree7f94b740dfeb6ea8f4e93bd9d822173cc22c0660 /src/libmime/mime_parser.c
parentdb804038ea664d0acff9c58bbb767754e115d036 (diff)
downloadrspamd-145ffe5a0671ff5ac28a2ecced78548f7f1cb0ac.tar.gz
rspamd-145ffe5a0671ff5ac28a2ecced78548f7f1cb0ac.zip
[Minor] Add ID to mime parts
Diffstat (limited to 'src/libmime/mime_parser.c')
-rw-r--r--src/libmime/mime_parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c
index c1c5c0889..2972d3389 100644
--- a/src/libmime/mime_parser.c
+++ b/src/libmime/mime_parser.c
@@ -510,6 +510,7 @@ rspamd_mime_parse_normal_part (struct rspamd_task *task,
g_assert_not_reached ();
}
+ part->id = task->parts->len;
g_ptr_array_add (task->parts, part);
msg_debug_mime ("parsed data part %T/%T of length %z (%z orig), %s cte",
&part->ct->type, &part->ct->subtype, part->parsed_data.len,
@@ -815,6 +816,7 @@ rspamd_mime_parse_multipart_part (struct rspamd_task *task,
return RSPAMD_MIME_PARSE_NESTING;
}
+ part->id = task->parts->len;
g_ptr_array_add (task->parts, part);
st->nesting ++;
rspamd_mime_part_get_cte (task, part->raw_headers, part, FALSE);