[dovecot-cvs] dovecot/src/lib-storage/index index-mail.c,1.64,1.65

cras at dovecot.org cras at dovecot.org
Wed Dec 15 22:05:20 EET 2004


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

Modified Files:
	index-mail.c 
Log Message:
Added pop3_uidl_format setting.



Index: index-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- index-mail.c	7 Dec 2004 00:08:00 -0000	1.64
+++ index-mail.c	15 Dec 2004 20:05:18 -0000	1.65
@@ -3,6 +3,7 @@
 #include "lib.h"
 #include "buffer.h"
 #include "istream.h"
+#include "hex-binary.h"
 #include "str.h"
 #include "message-date.h"
 #include "message-part-serialize.h"
@@ -518,6 +519,7 @@
 	struct index_mail_data *data = &mail->data;
 	struct mail_cache_field *cache_fields = mail->ibox->cache_fields;
 	string_t *str;
+	const void *ext_data;
 
 	switch (field) {
 	case MAIL_FETCH_IMAP_BODY:
@@ -579,13 +581,16 @@
 		return data->envelope;
 	case MAIL_FETCH_FROM_ENVELOPE:
 		return NULL;
-	case MAIL_FETCH_UID_STRING:
-		if (data->uid_string == NULL) {
-			data->uid_string =
-				p_strdup_printf(mail->pool, "%u.%u",
-						mail->uid_validity, _mail->uid);
+	case MAIL_FETCH_HEADER_MD5:
+		if (mail_index_lookup_ext(mail->trans->trans_view, data->seq,
+					  mail->ibox->md5hdr_ext_idx,
+					  &ext_data) < 0) {
+			mail_storage_set_index_error(mail->ibox);
+			return NULL;
 		}
-		return data->uid_string;
+		if (ext_data == NULL)
+			return NULL;
+		return binary_to_hex(ext_data, 16);
 	default:
 		i_unreached();
 		return NULL;



More information about the dovecot-cvs mailing list