more places where we can use cm_lengths;
[citadel.git] / citadel / modules / imap / imap_search.c
index aaa02dbe23260e4c3fbd8e22aa3317552b09df0f..cad499ceb63ad2091768ae552a5d8c99b2243758 100644 (file)
@@ -281,7 +281,7 @@ int imap_do_search_msg(int seq, struct CtdlMessage *supplied_msg,
                        need_to_free_msg = 1;
                }
                if (msg != NULL) {
-                       if (strlen(msg->cm_fields[eMesageText]) > atoi(itemlist[pos+1].Key)) {
+                       if (msg->cm_lengths[eMesageText] > atoi(itemlist[pos+1].Key)) {
                                match = 1;
                        }
                }
@@ -402,7 +402,7 @@ int imap_do_search_msg(int seq, struct CtdlMessage *supplied_msg,
                        need_to_free_msg = 1;
                }
                if (msg != NULL) {
-                       if (strlen(msg->cm_fields[eMesageText]) < atoi(itemlist[pos+1].Key)) {
+                       if (msg->cm_lengths[eMesageText] < atoi(itemlist[pos+1].Key)) {
                                match = 1;
                        }
                }
@@ -531,7 +531,7 @@ int imap_do_search_msg(int seq, struct CtdlMessage *supplied_msg,
        }
 
        if (need_to_free_msg) {
-               CtdlFreeMessage(msg);
+               CM_Free(msg);
        }
        return(match);
 }