dovecot-1.2: quota: Previous change broke other plugins.

dovecot at dovecot.org dovecot at dovecot.org
Tue Apr 7 21:42:23 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/4907cc591449
changeset: 8925:4907cc591449
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Apr 07 14:42:16 2009 -0400
description:
quota: Previous change broke other plugins.

diffstat:

1 file changed, 15 insertions(+), 16 deletions(-)
src/plugins/quota/quota-storage.c |   31 +++++++++++++++----------------

diffs (41 lines):

diff -r f38765916f6d -r 4907cc591449 src/plugins/quota/quota-storage.c
--- a/src/plugins/quota/quota-storage.c	Tue Apr 07 12:26:50 2009 -0400
+++ b/src/plugins/quota/quota-storage.c	Tue Apr 07 14:42:16 2009 -0400
@@ -513,22 +513,21 @@ void quota_mail_storage_created(struct m
 	union mail_storage_module_context *qstorage;
 	struct quota *quota;
 
-	if (qlist == NULL)
-		return;
-
-	qlist->storage = storage;
-
-	qstorage = p_new(storage->pool,
-			 union mail_storage_module_context, 1);
-	qstorage->super = storage->v;
-	storage->v.destroy = quota_storage_destroy;
-	storage->v.mailbox_open = quota_mailbox_open;
-
-	MODULE_CONTEXT_SET_SELF(storage, quota_storage_module, qstorage);
-
-	/* register to owner's quota roots */
-	quota = quota_get_mail_user_quota(storage->ns->owner);
-	quota_add_user_storage(quota, storage);
+	if (qlist != NULL) {
+		qlist->storage = storage;
+		qstorage = p_new(storage->pool,
+				 union mail_storage_module_context, 1);
+		qstorage->super = storage->v;
+		storage->v.destroy = quota_storage_destroy;
+		storage->v.mailbox_open = quota_mailbox_open;
+
+		MODULE_CONTEXT_SET_SELF(storage, quota_storage_module,
+					qstorage);
+
+		/* register to owner's quota roots */
+		quota = quota_get_mail_user_quota(storage->ns->owner);
+		quota_add_user_storage(quota, storage);
+	}
 
 	if (quota_next_hook_mail_storage_created != NULL)
 		quota_next_hook_mail_storage_created(storage);


More information about the dovecot-cvs mailing list