dovecot-sieve-1.1: Use MESSAGE_PARSER_FLAG_SKIP_BODY_BLOCK with ...

dovecot at dovecot.org dovecot at dovecot.org
Sat May 30 00:45:51 EEST 2009


details:   http://hg.dovecot.org/dovecot-sieve-1.1/rev/f3ee2c69e8c7
changeset: 68:f3ee2c69e8c7
user:      Timo Sirainen <tss at iki.fi>
date:      Fri May 29 17:45:47 2009 -0400
description:
Use MESSAGE_PARSER_FLAG_SKIP_BODY_BLOCK with message_parser_init_from_parts().
Newer Dovecot versions enforce this.

diffstat:

1 file changed, 3 insertions(+), 1 deletion(-)
src/sieve-cmu.c |    4 +++-

diffs (21 lines):

diff -r b9567e94b897 -r f3ee2c69e8c7 src/sieve-cmu.c
--- a/src/sieve-cmu.c	Mon Mar 09 17:02:01 2009 -0400
+++ b/src/sieve-cmu.c	Fri May 29 17:45:47 2009 -0400
@@ -305,6 +305,8 @@ parts_add_missing(sieve_msgdata_t *m, co
 parts_add_missing(sieve_msgdata_t *m, const char **content_types,
 		  bool decode_to_plain)
 {
+	enum message_parser_flags parser_flags =
+		MESSAGE_PARSER_FLAG_SKIP_BODY_BLOCK;
 	struct sieve_body_part *body_part = NULL;
 	struct message_parser_ctx *parser;
 	struct message_decoder_context *decoder;
@@ -327,7 +329,7 @@ parts_add_missing(sieve_msgdata_t *m, co
 
 	buffer_set_used_size(m->tmp_buffer, 0);
 	decoder = decode_to_plain ? message_decoder_init(FALSE) : NULL;
-	parser = message_parser_init_from_parts(parts, input, 0, 0);
+	parser = message_parser_init_from_parts(parts, input, 0, parser_flags);
 	while ((ret = message_parser_parse_next_block(parser, &block)) > 0) {
 		if (block.part != prev_part) {
 			if (body_part != NULL && save_body) {


More information about the dovecot-cvs mailing list