[dovecot-cvs] dovecot/src/lib-index mail-index-update.c,1.48,1.49

cras at procontrol.fi cras at procontrol.fi
Wed Mar 26 17:40:18 EET 2003


Update of /home/cvs/dovecot/src/lib-index
In directory danu:/tmp/cvs-serv9747/src/lib-index

Modified Files:
	mail-index-update.c 
Log Message:
memory usage fixes



Index: mail-index-update.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index-update.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- mail-index-update.c	6 Mar 2003 19:23:44 -0000	1.48
+++ mail-index-update.c	26 Mar 2003 15:40:16 -0000	1.49
@@ -4,6 +4,7 @@
 #include "buffer.h"
 #include "istream.h"
 #include "ioloop.h"
+#include "str.h"
 #include "message-date.h"
 #include "message-parser.h"
 #include "message-part-serialize.h"
@@ -529,10 +530,13 @@
 	}
 
 	if (ctx.envelope != NULL) {
+		string_t *str;
+
 		t_push();
-		value = imap_envelope_get_part_data(ctx.envelope);
+		str = str_new(data_stack_pool, 2048);
+		imap_envelope_write_part_data(ctx.envelope, str);
 		update->index->update_field(update, DATA_FIELD_ENVELOPE,
-					    value, 0);
+					    str_c(str), 0);
 		t_pop();
 
 		pool_unref(ctx.envelope_pool);




More information about the dovecot-cvs mailing list