diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-10-14 15:15:36 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-10-14 15:15:36 +0100 |
commit | 88e8dc5fcb2a501728c0558501ed2345aff7a94f (patch) | |
tree | b9ba5b3283762d14c295d91e087cb6ad0d1ba0ec /src/libmime/mime_headers.c | |
parent | 943a36c4a6f3ce6f3e37ddd52422094d1e47d23b (diff) | |
download | rspamd-88e8dc5fcb2a501728c0558501ed2345aff7a94f.tar.gz rspamd-88e8dc5fcb2a501728c0558501ed2345aff7a94f.zip |
[Minor] Add method to get count of the headers
Diffstat (limited to 'src/libmime/mime_headers.c')
-rw-r--r-- | src/libmime/mime_headers.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c index 88675a629..3deb26a08 100644 --- a/src/libmime/mime_headers.c +++ b/src/libmime/mime_headers.c @@ -948,6 +948,16 @@ rspamd_message_get_header_array (struct rspamd_task *task, const gchar *field, field, need_modified); } +gsize +rspamd_mime_headers_count (struct rspamd_mime_headers_table *hdrs) +{ + if (hdrs) { + return kh_size (&hdrs->htb); + } + + return 0; +} + static void rspamd_message_headers_dtor (struct rspamd_mime_headers_table *hdrs) { |