[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dovecot-cvs
Subject:    [dovecot-cvs] dovecot/src/lib-storage/index index-search.c, 1.96,
From:       cras () dovecot ! org (cras () dovecot ! org)
Date:       2004-11-25 22:19:42
Message-ID: 20041125201940.ACD21C000DC1 () talvi ! dovecot ! org
[Download RAW message or body]

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;

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic