[dovecot-cvs] dovecot/src/plugins/quota quota-dict.c, 1.5, 1.6 quota.c, 1.3, 1.4

cras at dovecot.org cras at dovecot.org
Tue Jan 31 08:05:23 EET 2006


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

Modified Files:
	quota-dict.c quota.c 
Log Message:
Dictionary takes now a username parameter, which is used for private
queries. Made dict-sql use "insert .. on duplicate key update" syntax, which
unfortunately doesn't work with PostgreSQL yet.



Index: quota-dict.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-dict.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- quota-dict.c	13 Jan 2006 20:26:42 -0000	1.5
+++ quota-dict.c	31 Jan 2006 06:05:21 -0000	1.6
@@ -37,7 +37,7 @@
 	if (getenv("DEBUG") != NULL)
 		i_info("dict quota uri = %s", data);
 
-	dict = dict_init(data);
+	dict = dict_init(data, getenv("USER"));
 	if (dict == NULL)
 		return NULL;
 

Index: quota.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- quota.c	13 Jan 2006 20:26:42 -0000	1.3
+++ quota.c	31 Jan 2006 06:05:21 -0000	1.4
@@ -39,14 +39,16 @@
 		if (strcmp(quota_classes[i]->name, name) == 0)
 			break;
 	}
-	t_pop();
 
-	quota = i == QUOTA_CLASS_COUNT ? NULL :
-		quota_classes[i]->init(data);
-	if (quota != NULL) {
+	if (i == QUOTA_CLASS_COUNT) {
+		i_error("Unknown quota module: %s", name);
+		quota = NULL;
+	} else {
+		quota = quota_classes[i]->init(data);
 		array_create(&quota->quota_module_contexts,
 			     default_pool, sizeof(void *), 5);
 	}
+	t_pop();
 	return quota;
 }
 



More information about the dovecot-cvs mailing list