X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fimap%2Fimap_search.c;h=aaa02dbe23260e4c3fbd8e22aa3317552b09df0f;hp=387e747c9e080eb67a353b9418cff4b1872bf8a5;hb=e6219cc9b27e56e3b41170f864da30fa7b13ee01;hpb=848934c1722edc208c4df49c571586b72c3fc486 diff --git a/citadel/modules/imap/imap_search.c b/citadel/modules/imap/imap_search.c index 387e747c9..aaa02dbe2 100644 --- a/citadel/modules/imap/imap_search.c +++ b/citadel/modules/imap/imap_search.c @@ -142,7 +142,7 @@ int imap_do_search_msg(int seq, struct CtdlMessage *supplied_msg, need_to_free_msg = 1; } if (msg != NULL) { - if (msg->cm_fields[eTimestamp] != NULL) { + if (!CM_IsEmpty(msg, eTimestamp)) { if (imap_datecmp(itemlist[pos+1].Key, atol(msg->cm_fields[eTimestamp])) < 0) { match = 1; @@ -308,7 +308,7 @@ int imap_do_search_msg(int seq, struct CtdlMessage *supplied_msg, need_to_free_msg = 1; } if (msg != NULL) { - if (msg->cm_fields[eTimestamp] != NULL) { + if (!CM_IsEmpty(msg, eTimestamp)) { if (imap_datecmp(itemlist[pos+1].Key, atol(msg->cm_fields[eTimestamp])) == 0) { match = 1; @@ -338,7 +338,7 @@ int imap_do_search_msg(int seq, struct CtdlMessage *supplied_msg, need_to_free_msg = 1; } if (msg != NULL) { - if (msg->cm_fields[eTimestamp] != NULL) { + if (!CM_IsEmpty(msg, eTimestamp)) { if (imap_datecmp(itemlist[pos+1].Key, atol(msg->cm_fields[eTimestamp])) < 0) { match = 1; @@ -354,7 +354,7 @@ int imap_do_search_msg(int seq, struct CtdlMessage *supplied_msg, need_to_free_msg = 1; } if (msg != NULL) { - if (msg->cm_fields[eTimestamp] != NULL) { + if (!CM_IsEmpty(msg, eTimestamp)) { if (imap_datecmp(itemlist[pos+1].Key, atol(msg->cm_fields[eTimestamp])) == 0) { match = 1; @@ -370,7 +370,7 @@ int imap_do_search_msg(int seq, struct CtdlMessage *supplied_msg, need_to_free_msg = 1; } if (msg != NULL) { - if (msg->cm_fields[eTimestamp] != NULL) { + if (!CM_IsEmpty(msg, eTimestamp)) { if (imap_datecmp(itemlist[pos+1].Key, atol(msg->cm_fields[eTimestamp])) >= 0) { match = 1; @@ -386,7 +386,7 @@ int imap_do_search_msg(int seq, struct CtdlMessage *supplied_msg, need_to_free_msg = 1; } if (msg != NULL) { - if (msg->cm_fields[eTimestamp] != NULL) { + if (!CM_IsEmpty(msg, eTimestamp)) { if (imap_datecmp(itemlist[pos+1].Key, atol(msg->cm_fields[eTimestamp])) >= 0) { match = 1;