[dovecot-cvs] dovecot/src/imap imap-fetch.c,1.51,1.52

tss at dovecot.org tss at dovecot.org
Thu Dec 28 18:37:27 UTC 2006


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

Modified Files:
	imap-fetch.c 
Log Message:
Removed accidentally committed TEXTSIZE FETCH parameter.


Index: imap-fetch.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-fetch.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- imap-fetch.c	20 Dec 2006 19:23:46 -0000	1.51
+++ imap-fetch.c	28 Dec 2006 18:37:25 -0000	1.52
@@ -8,7 +8,6 @@
 #include "str.h"
 #include "message-send.h"
 #include "message-size.h"
-#include "message-parser.h"
 #include "imap-date.h"
 #include "commands.h"
 #include "imap-fetch.h"
@@ -16,7 +15,7 @@
 
 #include <stdlib.h>
 
-const struct imap_fetch_handler default_handlers[8];
+const struct imap_fetch_handler default_handlers[7];
 static buffer_t *fetch_handlers = NULL;
 
 static int imap_fetch_handler_cmp(const void *p1, const void *p2)
@@ -538,51 +537,12 @@
 	return TRUE;
 }
 
-static uoff_t textsize_count(const struct message_part *part)
-{
-	uoff_t size = 0;
-
-	for (; part != NULL; part = part->next) {
-		if (part->flags & (MESSAGE_PART_FLAG_TEXT |
-				   MESSAGE_PART_FLAG_MESSAGE_RFC822)) {
-			size += part->header_size.physical_size +
-				part->body_size.physical_size;
-		}
-		if (part->children != NULL)
-			size += textsize_count(part->children);
-	}
-	return size;
-}
-
-static int fetch_textsize(struct imap_fetch_context *ctx, struct mail *mail,
-			  void *context __attr_unused__)
-{
-	const struct message_part *part;
-
-	part = mail_get_parts(mail);
-	if (part == NULL)
-		return -1;
-
-	str_printfa(ctx->cur_str, "TEXTSIZE %"PRIuUOFF_T" ",
-		    textsize_count(part));
-	return 1;
-}
-
-static bool fetch_textsize_init(struct imap_fetch_context *ctx __attr_unused__,
-				const char *name __attr_unused__,
-				struct imap_arg **args __attr_unused__)
-{
-	imap_fetch_add_handler(ctx, TRUE, FALSE, fetch_textsize, NULL);
-	return TRUE;
-}
-
-const struct imap_fetch_handler default_handlers[8] = {
+const struct imap_fetch_handler default_handlers[7] = {
 	{ "BODY", fetch_body_init },
 	{ "BODYSTRUCTURE", fetch_bodystructure_init },
 	{ "ENVELOPE", fetch_envelope_init },
 	{ "FLAGS", fetch_flags_init },
 	{ "INTERNALDATE", fetch_internaldate_init },
 	{ "RFC822", fetch_rfc822_init },
-	{ "TEXTSIZE", fetch_textsize_init },
 	{ "UID", fetch_uid_init }
 };



More information about the dovecot-cvs mailing list