Mercurial > dovecot > original-hg > dovecot-1.2
comparison src/plugins/mail-log/mail-log-plugin.c @ 5117:02f7ce1e75f6 HEAD
Don't crash with expunging mails with non-existing message-id header.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 07 Feb 2007 03:45:33 +0200 |
parents | 1b28e0434d85 |
children | 24f4a959a24c |
comparison
equal
deleted
inserted
replaced
5116:6d60ec110746 | 5117:02f7ce1e75f6 |
---|---|
38 { | 38 { |
39 const char *msgid; | 39 const char *msgid; |
40 | 40 |
41 msgid = mail_get_first_header(mail, "Message-ID"); | 41 msgid = mail_get_first_header(mail, "Message-ID"); |
42 i_info("%s: uid=%u, msgid=%s", action, mail->uid, | 42 i_info("%s: uid=%u, msgid=%s", action, mail->uid, |
43 str_sanitize(msgid, MSGID_LOG_LEN)); | 43 msgid == NULL ? "(null)" : str_sanitize(msgid, MSGID_LOG_LEN)); |
44 } | 44 } |
45 | 45 |
46 static int mail_log_mail_expunge(struct mail *_mail) | 46 static int mail_log_mail_expunge(struct mail *_mail) |
47 { | 47 { |
48 struct mail_private *mail = (struct mail_private *)_mail; | 48 struct mail_private *mail = (struct mail_private *)_mail; |