dovecot-1.0: Use even easier way to check for first header: name...

dovecot at dovecot.org dovecot at dovecot.org
Thu Nov 8 19:46:27 EET 2007


details:   http://hg.dovecot.org/dovecot-1.0/rev/96134d6cfc38
changeset: 5451:96134d6cfc38
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Nov 08 19:46:20 2007 +0200
description:
Use even easier way to check for first header: name_offset==0.

diffstat:

1 file changed, 4 insertions(+), 6 deletions(-)
src/deliver/deliver.c |   10 ++++------

diffs (27 lines):

diff -r a4a076529140 -r 96134d6cfc38 src/deliver/deliver.c
--- a/src/deliver/deliver.c	Thu Nov 08 18:44:12 2007 +0200
+++ b/src/deliver/deliver.c	Thu Nov 08 19:46:20 2007 +0200
@@ -431,11 +431,9 @@ static const char *address_sanitize(cons
 
 
 static void save_header_callback(struct message_header_line *hdr,
-				 bool *matched, void *context)
-{
-	struct istream *input = context;
-
-	if (input->v_offset == 0) {
+				 bool *matched, void *context __attr_unused__)
+{
+	if (hdr->name_offset == 0) {
 		if (hdr != NULL && strncmp(hdr->name, "From ", 5) == 0)
 			*matched = TRUE;
 	}
@@ -462,7 +460,7 @@ create_mbox_stream(int fd, const char *e
 						     mbox_hide_headers,
 						     mbox_hide_headers_count,
 						     save_header_callback,
-						     input);
+						     NULL);
 	i_stream_unref(&input);
 
 	input_list[0] = i_stream_create_from_data(default_pool, mbox_hdr,


More information about the dovecot-cvs mailing list