dovecot-2.2: lib-storage: Allow mailbox_attribute_set() to also ...

dovecot at dovecot.org dovecot at dovecot.org
Tue Mar 19 14:00:59 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/cdfc9f30b482
changeset: 16045:cdfc9f30b482
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Mar 19 13:59:02 2013 +0200
description:
lib-storage: Allow mailbox_attribute_set() to also unset values.
This allows giving the last_change timestamp also when unsetting.

diffstat:

 src/lib-storage/mail-storage.c |  2 --
 src/lib-storage/mail-storage.h |  3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r 2396eb0a3e3f -r cdfc9f30b482 src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c	Tue Mar 19 13:34:12 2013 +0200
+++ b/src/lib-storage/mail-storage.c	Tue Mar 19 13:59:02 2013 +0200
@@ -1525,8 +1525,6 @@
 			  enum mail_attribute_type type, const char *key,
 			  const struct mail_attribute_value *value)
 {
-	i_assert(value->value != NULL);
-
 	return t->box->v.attribute_set(t, type, key, value);
 }
 
diff -r 2396eb0a3e3f -r cdfc9f30b482 src/lib-storage/mail-storage.h
--- a/src/lib-storage/mail-storage.h	Tue Mar 19 13:34:12 2013 +0200
+++ b/src/lib-storage/mail-storage.h	Tue Mar 19 13:59:02 2013 +0200
@@ -555,7 +555,8 @@
 int mailbox_attribute_set(struct mailbox_transaction_context *t,
 			  enum mail_attribute_type type, const char *key,
 			  const struct mail_attribute_value *value);
-/* Delete mailbox attribute key. */
+/* Delete mailbox attribute key. This is just a wrapper to
+   mailbox_attribute_set() with value->value=NULL. */
 int mailbox_attribute_unset(struct mailbox_transaction_context *t,
 			    enum mail_attribute_type type, const char *key);
 /* Returns value for mailbox attribute key. Returns 1 if value was returned,


More information about the dovecot-cvs mailing list