pos += 2;
}
+ /* FIXME this is b0rken. fix it. */
+ else if (imap_is_message_set(itemlist[pos])) {
+ if (is_msg_in_sequence_set(itemlist[pos], seq)) {
+ match = 1;
+ }
+ pos += 1;
+ }
+
+ /* FIXME this is b0rken. fix it. */
else if (!strcasecmp(itemlist[pos], "UID")) {
if (is_msg_in_sequence_set(itemlist[pos+1], IMAP->msgids[seq-1])) {
match = 1;
/* Now here come the 'UN' criteria. Why oh why do we have to
* implement *both* the 'UN' criteria *and* the 'NOT' keyword? Why
- * can't there be *one* way to do things? Answer: the design of
- * IMAP suffers from gratuitous complexity.
+ * can't there be *one* way to do things? More gratuitous complexity.
*/
else if (!strcasecmp(itemlist[pos], "UNANSWERED")) {
IMAP->flags[i] |= IMAP_SELECTED;
}
- for (i=1; i<num_parms; ++i) {
- if (imap_is_message_set(parms[i])) {
- imap_pick_range(parms[i], 0);
- }
- }
-
imap_do_search(num_parms-2, &parms[2], 0);
cprintf("%s OK SEARCH completed\r\n", parms[0]);
}
IMAP->flags[i] |= IMAP_SELECTED;
}
- for (i=1; i<num_parms; ++i) {
- if (imap_is_message_set(parms[i])) {
- imap_pick_range(parms[i], 1);
- }
- }
-
imap_do_search(num_parms-3, &parms[3], 1);
cprintf("%s OK UID SEARCH completed\r\n", parms[0]);
}