[dovecot-cvs] dovecot/src/pop3 client.c, 1.26, 1.27 client.h, 1.4, 1.5 commands.c, 1.16, 1.17

cras at procontrol.fi cras at procontrol.fi
Wed Jun 23 21:33:25 EEST 2004


Update of /home/cvs/dovecot/src/pop3
In directory talvi:/tmp/cvs-serv6214/pop3

Modified Files:
	client.c client.h commands.c 
Log Message:
Added a framework for getting POP3 UIDL strings from mail-storage. The
default still is uidvalidity.uid. Added beginnings of overriding it from
X-UIDL header in mbox.



Index: client.c
===================================================================
RCS file: /home/cvs/dovecot/src/pop3/client.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- client.c	30 May 2004 05:11:09 -0000	1.26
+++ client.c	23 Jun 2004 18:33:22 -0000	1.27
@@ -51,8 +51,7 @@
 	search_arg.type = SEARCH_ALL;
 
 	for (i = 0; i < 2; i++) {
-		if (mailbox_get_status(client->mailbox,
-				       STATUS_MESSAGES | STATUS_UIDVALIDITY,
+		if (mailbox_get_status(client->mailbox, STATUS_MESSAGES,
 				       &status) < 0) {
 			client_send_storage_error(client);
 			return FALSE;
@@ -60,7 +59,6 @@
 
 		client->messages_count = status.messages;
 		client->deleted_size = 0;
-		client->uidvalidity = status.uidvalidity;
 
 		if (client->messages_count == 0)
 			return TRUE;

Index: client.h
===================================================================
RCS file: /home/cvs/dovecot/src/pop3/client.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- client.h	10 May 2004 01:28:19 -0000	1.4
+++ client.h	23 Jun 2004 18:33:22 -0000	1.5
@@ -17,7 +17,6 @@
 
 	unsigned int messages_count;
 	unsigned int deleted_count;
-	unsigned int uidvalidity;
 	uoff_t *message_sizes;
 	uoff_t total_size;
 	uoff_t deleted_size;

Index: commands.c
===================================================================
RCS file: /home/cvs/dovecot/src/pop3/commands.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- commands.c	24 May 2004 22:35:56 -0000	1.16
+++ commands.c	23 Jun 2004 18:33:22 -0000	1.17
@@ -366,6 +366,7 @@
         struct mailbox_transaction_context *t;
 	struct mail_search_context *ctx;
 	struct mail *mail;
+	const char *uid_str;
 	int found = FALSE;
 
 	if (client->messages_count == 0 && message == 0)
@@ -396,9 +397,9 @@
 				continue;
 		}
 
-		client_send_line(client, message == 0 ?
-				 "%u %u.%u" : "+OK %u %u.%u",
-				 mail->seq, client->uidvalidity, mail->uid);
+		uid_str = mail->get_special(mail, MAIL_FETCH_UID_STRING);
+		client_send_line(client, message == 0 ? "%u %s" : "+OK %u %s",
+				 mail->seq, uid_str);
 		found = TRUE;
 	}
 



More information about the dovecot-cvs mailing list