[dovecot-cvs] dovecot/src/imap imap-sort.c, 1.20, 1.21 imap-thread.c, 1.15, 1.16

cras at dovecot.org cras at dovecot.org
Tue Mar 29 19:48:50 EEST 2005


Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv27861/imap

Modified Files:
	imap-sort.c imap-thread.c 
Log Message:
Renamed mail_get_header() to mail_get_first_header() and mail_gets_headers()
to mail_get_header_stream(). Added new mail_get_headers() which returns
NULL-terminated string list of all found headers.



Index: imap-sort.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-sort.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- imap-sort.c	15 Mar 2005 19:01:51 -0000	1.20
+++ imap-sort.c	29 Mar 2005 16:48:48 -0000	1.21
@@ -290,7 +290,7 @@
 	struct message_address *addr;
 	const char *str;
 
-	str = mail_get_header(mail, field);
+	str = mail_get_first_header(mail, field);
 	if (str == NULL)
 		return NULL;
 
@@ -356,7 +356,7 @@
 	}
 
 	if (ctx->common_mask & MAIL_SORT_SUBJECT) {
-		str = mail_get_header(mail, "subject");
+		str = mail_get_first_header(mail, "subject");
 		if (str != NULL) {
 			str = imap_get_base_subject_cased(
 				pool_datastack_create(), str, NULL);
@@ -475,7 +475,7 @@
 		if (ctx->common_mask & MAIL_SORT_SUBJECT)
 			str = ctx->last_subject;
 		else {
-			str = mail_get_header(mail, "subject");
+			str = mail_get_first_header(mail, "subject");
 
 			if (str != NULL) {
 				str = imap_get_base_subject_cased(
@@ -580,7 +580,7 @@
 
 		switch (type) {
 		case MAIL_SORT_SUBJECT:
-			str = mail_get_header(mail, "subject");
+			str = mail_get_first_header(mail, "subject");
 			if (str == NULL)
 				return NULL;
 

Index: imap-thread.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-thread.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- imap-thread.c	15 Mar 2005 19:01:51 -0000	1.15
+++ imap-thread.c	29 Mar 2005 16:48:48 -0000	1.16
@@ -448,14 +448,14 @@
 	if (sent_date == (time_t)-1)
 		sent_date = 0;
 
-	message_id = mail_get_header(mail, "message-id");
+	message_id = mail_get_first_header(mail, "message-id");
 	node = update_message(ctx, get_msgid(&message_id), sent_date,
 			      ctx->id_is_uid ? mail->uid : mail->seq);
 
 	/* link references */
-	references = mail_get_header(mail, "references");
+	references = mail_get_first_header(mail, "references");
 	if (!link_references(ctx, node, references)) {
-		in_reply_to = mail_get_header(mail, "in-reply-to");
+		in_reply_to = mail_get_first_header(mail, "in-reply-to");
 		refid = in_reply_to == NULL ? NULL : get_msgid(&in_reply_to);
 
 		if (refid != NULL)
@@ -693,7 +693,7 @@
 
 		if (seq != 0 && mail_set_seq(ctx->mail, seq) == 0) {
 			t_push();
-                        subject = mail_get_header(ctx->mail, "subject");
+                        subject = mail_get_first_header(ctx->mail, "subject");
 			add_base_subject(ctx, subject, node);
 			t_pop();
 		}



More information about the dovecot-cvs mailing list