[dovecot-cvs] dovecot/src/lib-storage/index index-search.c, 1.96,
1.97
cras at dovecot.org
cras at dovecot.org
Thu Nov 25 22:19:40 EET 2004
Update of /var/lib/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv18665
Modified Files:
index-search.c
Log Message:
UID FETCH * gave error message with empty mailbox.
Index: index-search.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-search.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- index-search.c 24 Nov 2004 18:39:58 -0000 1.96
+++ index-search.c 25 Nov 2004 20:19:38 -0000 1.97
@@ -693,16 +693,19 @@
const struct mail_index_header *hdr;
hdr = mail_index_get_header(ctx->view);
- if (search_parse_msgset_args(ctx->ibox, hdr, args,
- &ctx->seq1, &ctx->seq2) < 0)
- return -1;
-
if (hdr->messages_count == 0) {
+ /* no messages, don't check sequence ranges. although we could
+ give error message then for FETCH, we shouldn't do it for
+ UID FETCH. */
ctx->seq1 = 1;
ctx->seq2 = 0;
return 0;
}
+ if (search_parse_msgset_args(ctx->ibox, hdr, args,
+ &ctx->seq1, &ctx->seq2) < 0)
+ return -1;
+
if (ctx->seq1 == 0) {
ctx->seq1 = 1;
ctx->seq2 = hdr->messages_count;
More information about the dovecot-cvs
mailing list