[dovecot-cvs] dovecot/src/plugins/quota quota-plugin.c, 1.3, 1.3.2.1 quota-plugin.h, 1.1, 1.1.2.1 quota-private.h, 1.7.2.1, 1.7.2.2 quota-storage.c, 1.6.2.2, 1.6.2.3

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


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

Modified Files:
      Tag: branch_1_0
	quota-plugin.c quota-plugin.h quota-private.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.3
retrieving revision 1.3.2.1
diff -u -d -r1.3 -r1.3.2.1
--- quota-plugin.c	1 Mar 2006 09:15:03 -0000	1.3
+++ quota-plugin.c	12 Nov 2006 18:48:28 -0000	1.3.2.1
@@ -12,7 +12,7 @@
 
 void (*quota_next_hook_mail_storage_created)(struct mail_storage *storage);
 
-struct quota *quota;
+struct quota *quota_set;
 
 void quota_plugin_init(void)
 {
@@ -20,9 +20,9 @@
 
 	env = getenv("QUOTA");
 	if (env != NULL) {
-		quota = quota_init();
+		quota_set = quota_init();
 		/* Currently we support only one quota setup */
-		(void)quota_setup_init(quota, env, TRUE);
+		(void)quota_setup_init(quota_set, env, TRUE);
 
 		quota_next_hook_mail_storage_created =
 			hook_mail_storage_created;
@@ -32,9 +32,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.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- quota-plugin.h	10 Dec 2005 19:44:46 -0000	1.1
+++ quota-plugin.h	12 Nov 2006 18:48:28 -0000	1.1.2.1
@@ -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-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-private.h,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -u -d -r1.7.2.1 -r1.7.2.2
--- quota-private.h	11 Jun 2006 17:34:48 -0000	1.7.2.1
+++ quota-private.h	12 Nov 2006 18:48:28 -0000	1.7.2.2
@@ -86,8 +86,6 @@
 };
 
 struct quota_transaction_context {
-	struct quota *quota;
-
 	array_t ARRAY_DEFINE(root_transactions,
 			     struct quota_root_transaction_context *);
 };

Index: quota-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-storage.c,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -u -d -r1.6.2.2 -r1.6.2.3
--- quota-storage.c	11 Jun 2006 17:34:48 -0000	1.6.2.2
+++ quota-storage.c	12 Nov 2006 18:48:28 -0000	1.6.2.3
@@ -125,7 +125,7 @@
 		return -1;
 	} else {
 		mail_storage_set_error(t->box->storage,  "%s",
-				       quota_last_error(quota));
+				       quota_last_error(quota_set));
 		return -1;
 	}
 }
@@ -190,7 +190,7 @@
 			return -1;
 		} else if (ret < 0) {
 			mail_storage_set_error(t->box->storage,  "%s",
-					       quota_last_error(quota));
+					       quota_last_error(quota_set));
 			return -1;
 		}
 	}
@@ -343,7 +343,7 @@
 
 	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