[dovecot-cvs] dovecot/src/pop3 client.c, 1.45, 1.46 commands.c, 1.37, 1.38

cras at dovecot.org cras at dovecot.org
Sun Dec 26 11:12:49 EET 2004


Update of /var/lib/cvs/dovecot/src/pop3
In directory talvi:/tmp/cvs-serv26125/pop3

Modified Files:
	client.c commands.c 
Log Message:
Initial support for keywords. Syncing to mbox/maildir doesn't work yet.



Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/client.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- client.c	15 Dec 2004 20:05:19 -0000	1.45
+++ client.c	26 Dec 2004 09:12:46 -0000	1.46
@@ -86,16 +86,13 @@
 		failed = FALSE;
 		while ((mail = mailbox_search_next(ctx)) != NULL) {
 			uoff_t size = mail->get_virtual_size(mail);
-			const struct mail_full_flags *flags;
-
-			flags = mail->get_flags(mail);
 
-			if (flags == NULL || size == (uoff_t)-1) {
+			if (size == (uoff_t)-1) {
 				failed = TRUE;
 				break;
 			}
 
-			if ((flags->flags & MAIL_SEEN) != 0)
+			if ((mail->get_flags(mail) & MAIL_SEEN) != 0)
 				client->last_seen = mail->seq;
                         client->total_size += size;
 

Index: commands.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/commands.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- commands.c	19 Dec 2004 06:36:13 -0000	1.37
+++ commands.c	26 Dec 2004 09:12:46 -0000	1.38
@@ -343,7 +343,6 @@
 {
         struct fetch_context *ctx;
 	struct mail *mail;
-	const struct mail_full_flags *flags;
 
 	ctx = i_new(struct fetch_context, 1);
 
@@ -364,15 +363,9 @@
 	}
 
 	if (body_lines == (uoff_t)-1 && !no_flag_updates) {
-		flags = mail->get_flags(mail);
-
-		if (flags != NULL && (flags->flags & MAIL_SEEN) == 0) {
+		if ((mail->get_flags(mail) & MAIL_SEEN) == 0) {
 			/* mark the message seen with RETR command */
-			struct mail_full_flags seen_flag;
-			memset(&seen_flag, 0, sizeof(seen_flag));
-			seen_flag.flags = MAIL_SEEN;
-
-			(void)mail->update_flags(mail, &seen_flag, MODIFY_ADD);
+			(void)mail->update_flags(mail, MAIL_SEEN, MODIFY_ADD);
 		}
 	}
 
@@ -409,7 +402,6 @@
 	struct mail_search_context *search_ctx;
 	struct mail *mail;
 	struct mail_search_arg search_arg;
-	struct mail_full_flags seen_flag;
 
 	client->last_seen = 0;
 
@@ -429,13 +421,10 @@
 		memset(&search_arg, 0, sizeof(search_arg));
 		search_arg.type = SEARCH_ALL;
 
-		memset(&seen_flag, 0, sizeof(seen_flag));
-		seen_flag.flags = MAIL_SEEN;
-
 		search_ctx = mailbox_search_init(client->trans, NULL,
 						 &search_arg, NULL, 0, NULL);
 		while ((mail = mailbox_search_next(search_ctx)) != NULL) {
-			if (mail->update_flags(mail, &seen_flag,
+			if (mail->update_flags(mail, MAIL_SEEN,
 					       MODIFY_REMOVE) < 0)
 				break;
 		}



More information about the dovecot-cvs mailing list