[dovecot-cvs] dovecot/src/lib-storage/index index-search.c,1.70,1.71
cras at procontrol.fi
cras at procontrol.fi
Tue Apr 22 22:11:37 EEST 2003
Update of /home/cvs/dovecot/src/lib-storage/index
In directory danu:/tmp/cvs-serv10631/lib-storage/index
Modified Files:
index-search.c
Log Message:
SEARCH OR fixes.
Index: index-search.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-search.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- index-search.c 8 Apr 2003 22:59:09 -0000 1.70
+++ index-search.c 22 Apr 2003 18:11:35 -0000 1.71
@@ -737,15 +737,17 @@
static int search_get_sequid(struct index_mailbox *ibox,
const struct mail_search_arg *args,
unsigned int *first_seq, unsigned int *last_seq,
- unsigned int *first_uid, unsigned int *last_uid)
+ unsigned int *first_uid, unsigned int *last_uid,
+ int default_all)
{
for (; args != NULL; args = args->next) {
if (args->type == SEARCH_OR || args->type == SEARCH_SUB) {
if (!search_get_sequid(ibox, args->value.subargs,
first_seq, last_seq,
- first_uid, last_uid))
+ first_uid, last_uid,
+ args->type == SEARCH_OR))
return FALSE;
- } if (args->type == SEARCH_SET) {
+ } else if (args->type == SEARCH_SET) {
if (!seq_update(args->value.str, first_seq, last_seq,
ibox->synced_messages_count)) {
mail_storage_set_error(ibox->box.storage,
@@ -761,7 +763,7 @@
args->value.str);
return FALSE;
}
- } else if (args->type == SEARCH_ALL) {
+ } else if (args->type == SEARCH_ALL || default_all) {
/* go through everything */
*first_seq = 1;
*last_seq = ibox->synced_messages_count;
@@ -859,7 +861,7 @@
first_seq = last_seq = 0;
if (!search_get_sequid(ibox, args, &first_seq, &last_seq,
- first_uid, last_uid))
+ first_uid, last_uid, FALSE))
return -1;
/* seq_update() should make sure that these can't happen */
More information about the dovecot-cvs
mailing list