[dovecot-cvs] dovecot/src/lib-storage/index index-mail-headers.c,1.13,1.14

cras at procontrol.fi cras at procontrol.fi
Tue Oct 7 03:23:39 EEST 2003


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

Modified Files:
	index-mail-headers.c 
Log Message:
If there was multiple headers with same name, we stored only first one into
cache.



Index: index-mail-headers.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-mail-headers.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- index-mail-headers.c	3 Oct 2003 15:26:31 -0000	1.13
+++ index-mail-headers.c	6 Oct 2003 23:23:37 -0000	1.14
@@ -356,21 +356,17 @@
 				     hdr->value, hdr->value_len);
 			if (!hdr->no_newline)
 				str_append(data->header_data, "\n");
-			if (!hdr->continues) {
-				cached_hdr->fully_saved = TRUE;
-				data->parsing_count--;
-			}
 		} else {
-			/* it's already in header_data. */
+			/* it's already in header_data. it means it's fully
+			   cached and we don't have to worry about other than
+			   the first header line. */
 			i_assert(cached_hdr->value_idx == 0);
 			cached_hdr->value_idx = data->header_stream->v_offset;
 
 			cached_hdr->fully_saved = TRUE;
-			data->parsing_count--;
+			if (--data->parsing_count == 0)
+				return FALSE;
 		}
-
-		if (data->parsing_count == 0)
-			return FALSE;
 	}
 	return TRUE;
 }



More information about the dovecot-cvs mailing list