aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-15 11:31:25 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-15 11:31:25 +0100
commit5cc8d34451974d69d87e7c86a57476197bb192ef (patch)
tree2181004238a15c5ba84f2d5324dba4fd121c55e6 /src/libmime
parent8b456a8bd8cf540ad4db74326d698d0d3560a87f (diff)
downloadrspamd-5cc8d34451974d69d87e7c86a57476197bb192ef.tar.gz
rspamd-5cc8d34451974d69d87e7c86a57476197bb192ef.zip
[Feature] Allow to get multipart children in Lua
Diffstat (limited to 'src/libmime')
-rw-r--r--src/libmime/content_type.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libmime/content_type.h b/src/libmime/content_type.h
index 9d5393e09..e71077911 100644
--- a/src/libmime/content_type.h
+++ b/src/libmime/content_type.h
@@ -30,9 +30,9 @@ enum rspamd_content_type_flags {
RSPAMD_CONTENT_TYPE_MISSING = 1 << 5,
};
-#define IS_CT_MULTIPART(ct) ((ct)->flags & RSPAMD_CONTENT_TYPE_MULTIPART)
-#define IS_CT_TEXT(ct) ((ct)->flags & RSPAMD_CONTENT_TYPE_TEXT)
-#define IS_CT_MESSAGE(ct) (((ct)->flags & RSPAMD_CONTENT_TYPE_MESSAGE))
+#define IS_CT_MULTIPART(ct) ((ct) && ((ct)->flags & RSPAMD_CONTENT_TYPE_MULTIPART))
+#define IS_CT_TEXT(ct) ((ct) && ((ct)->flags & RSPAMD_CONTENT_TYPE_TEXT))
+#define IS_CT_MESSAGE(ct) ((ct) &&((ct)->flags & RSPAMD_CONTENT_TYPE_MESSAGE))
struct rspamd_content_type_param {
rspamd_ftok_t name;