[dovecot-cvs] dovecot/src/lib-index mail-index-transaction.c, 1.55, 1.56

cras at dovecot.org cras at dovecot.org
Thu Mar 24 23:00:13 EET 2005


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv5194/lib-index

Modified Files:
	mail-index-transaction.c 
Log Message:
Array code changes broke setting old_data_r in mail_index_update_ext(). This
kept breaking cache file.



Index: mail-index-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- mail-index-transaction.c	12 Mar 2005 22:39:06 -0000	1.55
+++ mail-index-transaction.c	24 Mar 2005 21:00:10 -0000	1.56
@@ -685,8 +685,10 @@
 	if (mail_index_seq_array_lookup(array, seq, &idx)) {
 		/* already there, update */
 		p = array_modifyable_idx(array, idx);
-		if (old_record != NULL)
-			memcpy(old_record, p, record_size);
+		if (old_record != NULL) {
+			memcpy(old_record, PTR_OFFSET(p, sizeof(seq)),
+			       record_size);
+		}
 		memcpy(PTR_OFFSET(p, sizeof(seq)), record, record_size);
 		return TRUE;
 	} else {



More information about the dovecot-cvs mailing list