X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fimap%2Fimap_fetch.c;fp=citadel%2Fmodules%2Fimap%2Fimap_fetch.c;h=eb36ff9b38864062a99a1bdd30ed18bcd9457d2a;hb=e6219cc9b27e56e3b41170f864da30fa7b13ee01;hp=b9319610c8f0ed1e19ee07c8cdd8e14f45beeb3e;hpb=848934c1722edc208c4df49c571586b72c3fc486;p=citadel.git diff --git a/citadel/modules/imap/imap_fetch.c b/citadel/modules/imap/imap_fetch.c index b9319610c..eb36ff9b3 100644 --- a/citadel/modules/imap/imap_fetch.c +++ b/citadel/modules/imap/imap_fetch.c @@ -110,7 +110,7 @@ void imap_fetch_internaldate(struct CtdlMessage *msg) { time_t msgdate; if (!msg) return; - if (msg->cm_fields[eTimestamp] != NULL) { + if (!CM_IsEmpty(msg, eTimestamp)) { msgdate = atol(msg->cm_fields[eTimestamp]); } else { @@ -359,7 +359,7 @@ void imap_output_envelope_from(struct CtdlMessage *msg) { IAPuts(" NIL "); /* source route (not used) */ - if (msg->cm_fields[erFc822Addr] != NULL) { + if (!CM_IsEmpty(msg, erFc822Addr)) { process_rfc822_addr(msg->cm_fields[erFc822Addr], user, node, name); plain_imap_strout(user); /* mailbox name (user id) */ IAPuts(" "); @@ -445,7 +445,7 @@ void imap_fetch_envelope(struct CtdlMessage *msg) { if (!msg) return; /* Parse the message date into an IMAP-format date string */ - if (msg->cm_fields[eTimestamp] != NULL) { + if (!CM_IsEmpty(msg, eTimestamp)) { msgdate = atol(msg->cm_fields[eTimestamp]); } else {