[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-mail.c, 1.5, 1.6 maildir-storage.c, 1.78, 1.79 maildir-uidlist.h, 1.11, 1.12

cras at dovecot.org cras at dovecot.org
Mon Jul 12 00:04:49 EEST 2004


Update of /home/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv9221/lib-storage/index/maildir

Modified Files:
	maildir-mail.c maildir-storage.c maildir-uidlist.h 
Log Message:
Recent flags should be fully working now with maildir.



Index: maildir-mail.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/maildir/maildir-mail.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- maildir-mail.c	8 Jul 2004 20:26:16 -0000	1.5
+++ maildir-mail.c	11 Jul 2004 21:04:46 -0000	1.6
@@ -64,18 +64,6 @@
 	}
 }
 
-static const struct mail_full_flags *maildir_mail_get_flags(struct mail *_mail)
-{
-	struct index_mail *mail = (struct index_mail *)_mail;
-	struct index_mail_data *data = &mail->data;
-
-	(void)index_mail_get_flags(_mail);
-
-	if (maildir_uidlist_is_recent(mail->ibox->uidlist, _mail->uid))
-		data->flags.flags |= MAIL_RECENT;
-	return &data->flags;
-}
-
 static time_t maildir_mail_get_received_date(struct mail *_mail)
 {
 	struct index_mail *mail = (struct index_mail *) _mail;
@@ -180,7 +168,7 @@
 struct mail maildir_mail = {
 	0, 0, 0, 0, 0, 0,
 
-	maildir_mail_get_flags,
+	index_mail_get_flags,
 	index_mail_get_parts,
 	maildir_mail_get_received_date,
 	index_mail_get_date,

Index: maildir-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/maildir/maildir-storage.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- maildir-storage.c	9 Jul 2004 19:22:15 -0000	1.78
+++ maildir-storage.c	11 Jul 2004 21:04:46 -0000	1.79
@@ -401,9 +401,9 @@
 	return 0;
 }
 
-static uint32_t maildir_get_recent_count(struct index_mailbox *ibox)
+static int maildir_is_recent(struct index_mailbox *ibox, uint32_t uid)
 {
-	return maildir_uidlist_get_recent_count(ibox->uidlist);
+	return maildir_uidlist_is_recent(ibox->uidlist, uid);
 }
 
 static struct mailbox *
@@ -429,9 +429,9 @@
 	ibox->path = i_strdup(path);
 	ibox->control_dir = i_strdup(control_dir);
 
-	ibox->get_recent_count = maildir_get_recent_count;
 	ibox->mail_interface = &maildir_mail;
 	ibox->uidlist = maildir_uidlist_init(ibox);
+	ibox->is_recent = maildir_is_recent;
 
 	/* for shared mailboxes get the create mode from the
 	   permissions of dovecot-shared file */

Index: maildir-uidlist.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/maildir/maildir-uidlist.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- maildir-uidlist.h	3 Jul 2004 10:57:53 -0000	1.11
+++ maildir-uidlist.h	11 Jul 2004 21:04:46 -0000	1.12
@@ -1,4 +1,4 @@
-#ifndef __MAILDIR_UIDLIST_H
+#ifndef __MAILDIR_UIDLI3ST_H
 #define __MAILDIR_UIDLIST_H
 
 #define MAILDIR_UIDLIST_NAME "dovecot-uidlist"



More information about the dovecot-cvs mailing list