[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-mail.c, 1.28, 1.29

tss at dovecot.org tss at dovecot.org
Sun Oct 15 11:36:29 UTC 2006


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

Modified Files:
	maildir-mail.c 
Log Message:
We added received date as time_t instead of uint32_t which crashed with
64bit systems.



Index: maildir-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-mail.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- maildir-mail.c	1 Jul 2006 17:53:55 -0000	1.28
+++ maildir-mail.c	15 Oct 2006 10:36:27 -0000	1.29
@@ -78,6 +78,7 @@
 	struct maildir_mailbox *mbox = (struct maildir_mailbox *)mail->box;
 	struct index_mail_data *data = &((struct index_mail *)mail)->data;
 	const char *path;
+	uint32_t t;
 	int fd;
 
 	if (data->access_part != 0 && data->stream == NULL) {
@@ -118,9 +119,8 @@
 	if (maildir_mail_stat(_mail, &st) < 0)
 		return (time_t)-1;
 
-	data->received_date = st.st_mtime;
-	index_mail_cache_add(mail, MAIL_CACHE_RECEIVED_DATE,
-			     &data->received_date, sizeof(data->received_date));
+	data->received_date = t = st.st_mtime;
+	index_mail_cache_add(mail, MAIL_CACHE_RECEIVED_DATE, &t, sizeof(t));
 	return data->received_date;
 }
 



More information about the dovecot-cvs mailing list