[dovecot-cvs] dovecot/src/plugins/quota quota-plugin.c, 1.4, 1.5 quota-plugin.h, 1.1, 1.2 quota-storage.c, 1.11, 1.12

tss at dovecot.org tss at dovecot.org
Sun Nov 12 18:48:37 UTC 2006


Update of /var/lib/cvs/dovecot/src/plugins/quota
In directory talvi:/tmp/cvs-serv23558/quota

Modified Files:
	quota-plugin.c quota-plugin.h quota-storage.c 
Log Message:
s/quota/quota_set/ so we don't conflict with the quota symbol already
present in Mac OS X.



Index: quota-plugin.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-plugin.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- quota-plugin.c	30 Jul 2006 17:58:43 -0000	1.4
+++ quota-plugin.c	12 Nov 2006 18:48:33 -0000	1.5
@@ -12,7 +12,7 @@
 
 void (*quota_next_hook_mail_storage_created)(struct mail_storage *storage);
 
-struct quota *quota;
+struct quota *quota_set;
 
 static void quota_root_add_rules(const char *root_name, 
 				 struct quota_root *root)
@@ -49,9 +49,9 @@
 	if (env == NULL)
 		return;
 
-	quota = quota_init();
+	quota_set = quota_init();
 
-	root = quota_root_init(quota, env);
+	root = quota_root_init(quota_set, env);
 	if (root == NULL)
 		i_fatal("Couldn't create quota root: %s", env);
 	quota_root_add_rules("QUOTA", root);
@@ -66,7 +66,7 @@
 		if (env == NULL)
 			break;
 
-		root = quota_root_init(quota, env);
+		root = quota_root_init(quota_set, env);
 		if (root == NULL)
 			i_fatal("Couldn't create quota root: %s", env);
 		quota_root_add_rules(root_name, root);
@@ -80,9 +80,9 @@
 
 void quota_plugin_deinit(void)
 {
-	if (quota != NULL) {
+	if (quota_set != NULL) {
 		hook_mail_storage_created =
 			quota_next_hook_mail_storage_created;
-		quota_deinit(quota);
+		quota_deinit(quota_set);
 	}
 }

Index: quota-plugin.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-plugin.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- quota-plugin.h	10 Dec 2005 19:44:46 -0000	1.1
+++ quota-plugin.h	12 Nov 2006 18:48:33 -0000	1.2
@@ -5,7 +5,9 @@
 
 extern void (*quota_next_hook_mail_storage_created)
 	(struct mail_storage *storage);
-extern struct quota *quota;
+/* "quota" symbol already exists in OSX, so we'll use this slightly uglier
+   name. */
+extern struct quota *quota_set;
 
 void quota_mail_storage_created(struct mail_storage *storage);
 

Index: quota-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-storage.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- quota-storage.c	30 Jul 2006 17:58:43 -0000	1.11
+++ quota-storage.c	12 Nov 2006 18:48:33 -0000	1.12
@@ -54,7 +54,7 @@
 	struct quota_transaction_context *qt;
 
 	t = qbox->super.transaction_begin(box, flags);
-	qt = quota_transaction_begin(quota, box);
+	qt = quota_transaction_begin(quota_set, box);
 
 	array_idx_set(&t->module_contexts, quota_storage_module_id, &qt);
 	return t;
@@ -294,7 +294,7 @@
 {
 	struct quota_mail_storage *qstorage = QUOTA_CONTEXT(storage);
 
-	quota_remove_user_storage(quota, storage);
+	quota_remove_user_storage(quota_set, storage);
 
 	qstorage->super.destroy(storage);
 }
@@ -322,6 +322,6 @@
 
 	if ((storage->flags & MAIL_STORAGE_FLAG_SHARED_NAMESPACE) == 0) {
 		/* register to user's quota roots */
-		quota_add_user_storage(quota, storage);
+		quota_add_user_storage(quota_set, storage);
 	}
 }



More information about the dovecot-cvs mailing list