changeset 4972:0103df03b5d4 HEAD

Removed accidentally committed TEXTSIZE FETCH parameter.
author Timo Sirainen <tss@iki.fi>
date Thu, 28 Dec 2006 20:37:25 +0200
parents 0c93af60fa9d
children ec41129cd0ef
files src/imap/imap-fetch.c
diffstat 1 files changed, 2 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap/imap-fetch.c	Thu Dec 28 20:09:07 2006 +0200
+++ b/src/imap/imap-fetch.c	Thu Dec 28 20:37:25 2006 +0200
@@ -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 }
 };