[dovecot-cvs] dovecot/src/lib-storage/index index-mail-headers.c,1.4,1.5 index-mail.c,1.21,1.22

cras at procontrol.fi cras at procontrol.fi
Sun Aug 24 11:03:24 EEST 2003


Update of /home/cvs/dovecot/src/lib-storage/index
In directory danu:/tmp/cvs-serv8277/lib-storage/index

Modified Files:
	index-mail-headers.c index-mail.c 
Log Message:
use int32_t instead of int in struct mail_sent_date



Index: index-mail-headers.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-mail-headers.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- index-mail-headers.c	24 Aug 2003 05:57:43 -0000	1.4
+++ index-mail-headers.c	24 Aug 2003 07:03:22 -0000	1.5
@@ -265,6 +265,7 @@
 	struct index_mail *mail = context;
 	struct index_mail_data *data = &mail->data;
 	struct cached_header *cached_hdr;
+	int timezone;
 
 	if (data->bodystructure_header_parse)
 		imap_bodystructure_parse_header(mail->pool, part, hdr);
@@ -311,11 +312,12 @@
 			if (!message_date_parse(hdr->full_value,
 						hdr->full_value_len,
 						&data->sent_date.time,
-						&data->sent_date.timezone)) {
+						&timezone)) {
 				/* 0 == parse error */
 				data->sent_date.time = 0;
-				data->sent_date.timezone = 0;
+				timezone = 0;
 			}
+                        data->sent_date.timezone = timezone;
 			data->save_sent_date = FALSE;
 		}
 	}

Index: index-mail.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- index-mail.c	21 Aug 2003 01:59:50 -0000	1.21
+++ index-mail.c	24 Aug 2003 07:03:22 -0000	1.22
@@ -263,6 +263,7 @@
 	struct index_mail *mail = (struct index_mail *) _mail;
 	struct index_mail_data *data = &mail->data;
 	const char *str;
+	int tz;
 
 	if (data->sent_date.time != (time_t)-1) {
 		if (timezone != NULL)
@@ -278,12 +279,12 @@
 		str = _mail->get_header(_mail, "Date");
 		if (data->sent_date.time == (time_t)-1) {
 			if (!message_date_parse(str, (size_t)-1,
-						&data->sent_date.time,
-						&data->sent_date.timezone)) {
+						&data->sent_date.time, &tz)) {
 				/* 0 == parse error */
 				data->sent_date.time = 0;
-				data->sent_date.timezone = 0;
+				tz = 0;
 			}
+                        data->sent_date.timezone = tz;
 			index_mail_cache_add(mail, MAIL_CACHE_SENT_DATE,
 					     &data->sent_date,
 					     sizeof(data->sent_date));



More information about the dovecot-cvs mailing list