diff src/imap/imap-fetch.c @ 2708:f1e9f3ec8135 HEAD

Buffer API change: we no longer support limited sized buffers where writes past limit wouldn't kill the process. They weren't used hardly anywhere, they could have hidden bugs and the code for handling them was too complex. This also changed base64 and hex-binary APIs.
author Timo Sirainen <tss@iki.fi>
date Fri, 08 Oct 2004 20:51:47 +0300
parents 48df7f95fa4a
children ca9d5d046f23
line wrap: on
line diff
--- a/src/imap/imap-fetch.c	Fri Oct 08 20:06:18 2004 +0300
+++ b/src/imap/imap-fetch.c	Fri Oct 08 20:51:47 2004 +0300
@@ -30,10 +30,8 @@
 	void *data;
 	size_t size;
 
-	if (fetch_handlers == NULL) {
-		fetch_handlers = buffer_create_dynamic(default_pool,
-						       128, (size_t)-1);
-	}
+	if (fetch_handlers == NULL)
+		fetch_handlers = buffer_create_dynamic(default_pool, 128);
 	buffer_append(fetch_handlers, handlers, sizeof(*handlers) * count);
 
 	data = buffer_get_modifyable_data(fetch_handlers, &size);
@@ -93,10 +91,8 @@
 
 	ctx->cur_str = str_new(default_pool, 8192);
 	ctx->seen_flag.flags = MAIL_SEEN;
-	ctx->all_headers_buf =
-		buffer_create_dynamic(client->cmd_pool, 128, (size_t)-1);
-	ctx->handlers =
-		buffer_create_dynamic(client->cmd_pool, 128, (size_t)-1);
+	ctx->all_headers_buf = buffer_create_dynamic(client->cmd_pool, 128);
+	ctx->handlers = buffer_create_dynamic(client->cmd_pool, 128);
 	return ctx;
 }