[dovecot-cvs] dovecot/src/lib-storage/index index-mail-headers.c,1.15,1.16

cras at procontrol.fi cras at procontrol.fi
Tue Oct 21 07:35:45 EEST 2003


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

Modified Files:
	index-mail-headers.c 
Log Message:
Don't save empty header lists



Index: index-mail-headers.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-mail-headers.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- index-mail-headers.c	21 Oct 2003 03:14:44 -0000	1.15
+++ index-mail-headers.c	21 Oct 2003 03:35:43 -0000	1.16
@@ -539,8 +539,12 @@
 				return FALSE;
 		}
 
-		data->header_save = TRUE;
-		data->header_save_idx = idx;
+		/* it's possible that we're parsing headers without wanting
+		   to save any of them */
+		if (buffer_get_used_size(data->headers) != 0) {
+			data->header_save = TRUE;
+			data->header_save_idx = idx;
+		}
 	}
 
 	data->bodystructure_header_parse = data->bodystructure_header_want;



More information about the dovecot-cvs mailing list