[dovecot-cvs] dovecot/src/lib-storage mail-copy.c, 1.2, 1.3 mail-storage-private.h, 1.12, 1.13 mail-storage.c, 1.34, 1.35 mail-storage.h, 1.87, 1.88 proxy-mailbox.c, 1.14, 1.15

cras at dovecot.org cras at dovecot.org
Sat Feb 5 14:01:51 EET 2005


Update of /var/lib/cvs/dovecot/src/lib-storage
In directory talvi:/tmp/cvs-serv21606/lib-storage

Modified Files:
	mail-copy.c mail-storage-private.h mail-storage.c 
	mail-storage.h proxy-mailbox.c 
Log Message:
Internal changes in how keywords are handled. struct mail_keywords isn't
automatically freed anymore, added *_keywords_free() for that.



Index: mail-copy.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-copy.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- mail-copy.c	26 Dec 2004 09:12:41 -0000	1.2
+++ mail-copy.c	5 Feb 2005 12:01:49 -0000	1.3
@@ -25,6 +25,8 @@
 	ctx = mailbox_save_init(t, mail->get_flags(mail), keywords,
 				mail->get_received_date(mail),
 				0, from_envelope, input, dest_mail_r != NULL);
+	if (keywords != NULL)
+		mailbox_keywords_free(t, keywords);
 
 	while (i_stream_read(input) != -1) {
 		if (mailbox_save_continue(ctx) < 0)

Index: mail-storage-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage-private.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- mail-storage-private.h	10 Jan 2005 17:37:23 -0000	1.12
+++ mail-storage-private.h	5 Feb 2005 12:01:49 -0000	1.13
@@ -86,6 +86,8 @@
 	struct mail_keywords *
 		(*keywords_create)(struct mailbox_transaction_context *t,
 				   const char *const keywords[]);
+	void (*keywords_free)(struct mailbox_transaction_context *t,
+			      struct mail_keywords *keywords);
 
 	struct mail *(*fetch)(struct mailbox_transaction_context *t,
 			      uint32_t seq,

Index: mail-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- mail-storage.c	10 Jan 2005 17:37:23 -0000	1.34
+++ mail-storage.c	5 Feb 2005 12:01:49 -0000	1.35
@@ -355,6 +355,12 @@
 	return t->box->keywords_create(t, keywords);
 }
 
+void mailbox_keywords_free(struct mailbox_transaction_context *t,
+			   struct mail_keywords *keywords)
+{
+	t->box->keywords_free(t, keywords);
+}
+
 struct mail *mailbox_fetch(struct mailbox_transaction_context *t, uint32_t seq,
 			   enum mail_fetch_field wanted_fields)
 {

Index: mail-storage.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage.h,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- mail-storage.h	10 Jan 2005 17:37:23 -0000	1.87
+++ mail-storage.h	5 Feb 2005 12:01:49 -0000	1.88
@@ -298,6 +298,8 @@
 struct mail_keywords *
 mailbox_keywords_create(struct mailbox_transaction_context *t,
 			const char *const keywords[]);
+void mailbox_keywords_free(struct mailbox_transaction_context *t,
+			   struct mail_keywords *keywords);
 
 /* Simplified fetching for a single sequence. */
 struct mail *mailbox_fetch(struct mailbox_transaction_context *t, uint32_t seq,

Index: proxy-mailbox.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/proxy-mailbox.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- proxy-mailbox.c	10 Jan 2005 17:37:23 -0000	1.14
+++ proxy-mailbox.c	5 Feb 2005 12:01:49 -0000	1.15
@@ -127,6 +127,16 @@
 	return pbox->box->keywords_create(pt->ctx, keywords);
 }
 
+static void _keywords_free(struct mailbox_transaction_context *t,
+			   struct mail_keywords *keywords)
+{
+	struct proxy_mailbox_transaction_context *pt =
+		(struct proxy_mailbox_transaction_context *)t;
+	struct proxy_mailbox *pbox = (struct proxy_mailbox *)t->box;
+
+	pbox->box->keywords_free(pt->ctx, keywords);
+}
+
 static struct mail_save_context *
 _save_init(struct mailbox_transaction_context *t,
 	   enum mail_flags flags, struct mail_keywords *keywords,
@@ -190,6 +200,7 @@
 	pb->transaction_rollback = _transaction_rollback;
 
 	pb->keywords_create = _keywords_create;
+	pb->keywords_free = _keywords_free;
 
 	pb->save_init = _save_init;
 	pb->save_continue = box->save_continue;



More information about the dovecot-cvs mailing list